/* ===== Theme tokens ===== */
:root{
  --bg:#ede8d0;
  --text:#262b28;
  --muted:#706b66;
  --accent:#74858d;
  --card:#f0ead6;
  --border:rgba(0,0,0,.12);
}

body[data-theme="dark"]{
  --bg:#1f2326;
  --text:#f3f1ea;
  --muted:#b8b3a8;
  --accent:#9bb7c7;
  --card:#2a2f33;
  --border:rgba(255,255,255,.16);
}

/* ===== Base===== */
html{ scroll-behavior:smooth; }
body{
  font-family:"Manrope",sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* ===== Navbar ===== */
.navbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 60px;
  background:var(--bg);
  font-family:"Raleway",sans-serif;
}
.logo img{ width:40px; height:auto; }
.nav-links{ list-style:none; display:flex; gap:30px; margin:0; padding:0; }
.nav-links a{
  text-decoration:none;
  color:var(--text);
  font-weight:500;
  position:relative;
  transition:color .3s ease;
}
.nav-links a::after{
  content:"";
  position:absolute;
  left:0; bottom:-4px;
  width:0%; height:1.5px;
  background:var(--text);
  transition:width .3s ease;
}
.nav-links a:hover{ color:var(--accent); }
.nav-links a:hover::after,
.nav-links a.active::after{ width:100%; }

/* Theme toggle */
.theme-toggle{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; margin-left:12px;
  background:transparent; color:var(--text);
  border:1px solid var(--border); border-radius:8px; cursor:pointer;
  transition:color .2s, border-color .2s, background-color .2s;
}
.theme-toggle:hover{ color:var(--accent); border-color:var(--accent); }

/* ===== Hero ===== */
.intro-hero{
  background:var(--bg);
  padding:clamp(56px,6vw,100px) 24px;
  display:flex; align-items:center; justify-content:center;
}
.intro-wrap{
  max-width:1000px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  gap:30px; flex-wrap:wrap;
}
.intro-text{ flex:1 1 450px; text-align:left; }
.intro-greet{
  font-family:"Manrope",sans-serif;
  color:var(--muted);
  font-size:clamp(14px,1.4vw,18px);
  margin:0 0 8px 0;
}
.intro-title{
  font-family:"Raleway",sans-serif;
  color:var(--text);
  margin:0 0 12px 0;
  font-weight:800;
  line-height:1.05;
  font-size:clamp(36px,8vw,80px);
}
.intro-title .dot{ color:var(--accent); margin-left:4px; }

/* Interactive name */
.name{ display:inline-flex; gap:1px; cursor:default; }
.name span{
  display:inline-block;
  transition:color .3s ease, transform .3s ease;
  color:var(--text);
}
.name span:nth-child(1):hover{ color:#ff0000; }
.name span:nth-child(2):hover{ color:#ff7f00; }
.name span:nth-child(3):hover{ color:#ffff00; }
.name span:nth-child(4):hover{ color:#00ff00; }
.name span:nth-child(5):hover{ color:#0000ff; }
.name span:nth-child(6):hover{ color:#4b0082; }
.name span:nth-child(7):hover{ color:#8b00ff; }
.name span:nth-child(8):hover{ color:#ff1493; }
.name span:nth-child(9):hover{ color:#00ced1; }
.name span:hover{ transform:translateY(-6px); }

/* Subtitle + highlight */
.intro-sub{
  font-family:"Manrope",sans-serif;
  color:var(--muted);
  font-size:clamp(16px,2.1vw,22px);
  line-height:1.6;
  max-width:52ch; margin:0;
}
.hl{
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  padding:2px 4px; border-radius:4px;
  box-decoration-break:clone; -webkit-box-decoration-break:clone;
}

/* Photo */
.intro-photo{ flex:0 0 220px; display:flex; justify-content:center; }
.intro-photo img{
  width:220px; height:220px; border-radius:50%;
  object-fit:cover; object-position:50% 20%;
  box-shadow:0 6px 16px rgba(0,0,0,.15);
  transition:transform .3s ease, box-shadow .3s ease;
}
.intro-photo img:hover{
  transform:scale(1.03);
  box-shadow:0 12px 28px rgba(0,0,0,.25);
}

/* Responsive hero */
@media (max-width:768px){
  .intro-wrap{ flex-direction:column-reverse; text-align:center; gap:20px; }
  .intro-text{ text-align:center; }
  .intro-photo img{ width:180px; height:180px; }
}


/* ===== WORK SECTION ===== */

.work-section {
  padding: 72px 24px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Project card wrapper */
.project-card {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Make the whole card clickable */
.project-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Image container */
.project-media {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
  transition: transform .25s ease, box-shadow .25s ease;
}

.project-media img {
  display: block;
  width: 100%;
  height: auto;
}

/* Hover lift effect */
.project-link:hover .project-media {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .16);
}

/* Text block */
.project-text {
  margin-top: 18px;
}

/* Title */
.project-title {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--text);
  margin: 0 0 8px 0;
}

/* Description */
.project-sub {
  font-family: "Manrope", sans-serif;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
  margin: 0;
}

/* Meta tag */
.project-meta {
  font-family: "Manrope", sans-serif;
  color: var(--accent);
  font-size: 0.95rem;
  margin-top: 8px;
}


/* =========================
   CONTACT PAGE
   ========================= */
.contact {
  background: var(--bg);
  color: var(--text);
  text-align: center;
  padding: clamp(120px, 15vh, 200px) clamp(40px, 8vw, 100px);
}

.contact-title {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  font-size: clamp(52px, 7vw, 96px);
  margin-bottom: 20px;
}

.contact-text {
  font-family: "Manrope", sans-serif;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 60px;
  line-height: 1.6;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.contact-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 50px;
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.contact-btn i {
  font-size: 1.2rem;
}

/* ===== Individual button colors ===== */
.linkedin {
  background: #0077b5;
}
.linkedin:hover {
  background: #005b8a;
}

.email {
  background: #ff8c94;
}
.email:hover {
  background: #e06c76;
}

.discord {
  background: #5865f2;
}
.discord:hover {
  background: #4752c4;
}

.contact-btn:hover {
  transform: translateY(-3px);
}


/* =========================
   ABOUT PAGE
   ========================= */
.about {
  background: var(--bg);
  color: var(--text);
  padding: clamp(100px, 14vh, 180px) clamp(40px, 8vw, 120px);
  font-family: "Manrope", sans-serif;
  max-width: 900px;
  margin: 0 auto;
}

.about-title {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  font-size: clamp(52px, 7vw, 96px);
  margin-bottom: 40px;
}

.about-text {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 40px;
}

.about-thanks {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-weight: 600;
}

.about-emoji {
  width: 33px;   
  height: 33px;
  vertical-align: middle;
  transform: translateY(2px); 
  border-radius: 10%;
}


/* =========================
   UI Designs Section (Section 3)
   ========================= */

.ui-design-section {
    padding: 72px 24px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center; /* Center the heading, paragraph, and button */
}

.ui-design-section h2 {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 40px);
    color: var(--text);
    margin: 0 0 10px 0;
}

.ui-design-section p {
    font-family: "Manrope", sans-serif;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 30px; /* Space above the button wrapper */
    line-height: 1.6;
}

/* Button Wrapper for spacing */
.button-wrap {
    margin-top: 20px;
}

/* Call-to-Action Button (styled similarly to contact buttons but unique) */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-family: "Manrope", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    
    /* Unique Accent Colour for Dribbble/Design */
    background: var(--accent);
    color: var(--bg); /* Use the light background color as text for contrast */
    border: 2px solid var(--accent); /* border for dark mode consistency */
    
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.cta-button i {
    font-size: 1.2rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    background: color-mix(in srgb, var(--accent) 80%, var(--bg)); /* Slightly lighter/darker on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    /* For better contrast in dark mode, you might need a separate rule if the mix isn't right */
}

/* =========================
   UI Designs Section (Gallery Layout)
   ========================= */

.ui-design-section {
    padding: 72px 24px;
    max-width: 1200px; /* Increased max-width for a better gallery look */
    margin: 0 auto;
    text-align: center;
}

.ui-design-section h2 {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 4vw, 40px);
    color: var(--text);
    margin: 0 0 10px 0;
}

.ui-design-section p {
    font-family: "Manrope", sans-serif;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 50px;
    line-height: 1.6;
}

/* Container for the showcase cards - NOW USING CSS GRID */
.ui-design-cards-container {
    display: grid; /* Use grid for structured layout */
    /* Create responsive columns: minimum of 300px per column, fit as many as possible */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; /* Reduced gap slightly for a tighter gallery */
    margin-bottom: 50px;
}

/* Individual Showcase Card */
.ui-design-showcase-card {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* Remove max-width/width/text-align as the Grid handles sizing */
    text-align: left;
    display: flex; /* Makes content fill the card height */
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ui-design-showcase-card:hover {
    transform: translateY(-5px); /* Lift slightly on hover */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Image/Media Area - FORCED ASPECT RATIO */
.showcase-media {
    width: 100%;
    /* Key change: Use padding-top for a 16:9 aspect ratio */
    padding-top: 56.25%; /* 9 / 16 * 100 = 56.25% */
    position: relative; /* Essential for positioning the image inside */
    overflow: hidden;
}

.showcase-media img {
    /* Position the image absolutely to cover the padded container */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area without distortion */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transition: transform 0.3s ease;
}

.ui-design-showcase-card:hover .showcase-media img {
    transform: scale(1.05); /* Slight zoom effect on image hover */
}


/* Information/Text Area - Ensures consistent spacing and pushes button to the bottom */
.showcase-info {
    padding: 25px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows this section to fill the remaining space */
}

.showcase-title {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 1.4rem; /* Fixed font size for consistency across card sizes */
    color: var(--text);
    margin: 0 0 8px 0;
}

.showcase-description {
    font-family: "Manrope", sans-serif;
    color: var(--muted);
    font-size: 1rem; /* Fixed font size for consistency */
    line-height: 1.5;
    margin: 0 0 20px 0;
    flex-grow: 1; /* Pushes the button down to the bottom */
}

/* Button within the showcase card */
.showcase-button {
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center button text/icon */
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-family: "Manrope", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    align-self: flex-start; /* Aligns the button to the left within the flex container */
    
    background: var(--accent);
    color: var(--bg);
    border: 2px solid var(--accent);
    
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.showcase-button i {
    font-size: 1rem;
}

.showcase-button:hover {
    transform: translateY(-3px);
    background: color-mix(in srgb, var(--accent) 80%, var(--bg));
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}