@layer reset, base, layout, components, utility;

@layer reset {

  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: auto;
    /* Lenis handles smooth scrolling — native smooth causes double-smoothing jitter */
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-block-size: 100vh;
    line-height: 1.6;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  img,
  picture {
    max-inline-size: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
  }

  button {
    cursor: pointer;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  ul,
  ol {
    list-style: none;
  }
}

@layer base {
  :root {
    color-scheme: light dark;

    /* Global Design System Variables */
    --bg-color: light-dark(#ffffff, #000000);
    --text-color: light-dark(#000000, #ffffff);
    --accent-color: light-dark(#b88e10, #d4af37);
    /* Optimized gold shade in light mode for accessibility contrast */

    /* Map Design System variables to layout variables */
    --color-bg: var(--bg-color);
    --color-surface: light-dark(#ffffff, #101012);
    --color-surface-hover: light-dark(#f1f3f5, #161619);
    --color-border: light-dark(#e9ecef, #1c1c20);
    --color-border-hover: light-dark(#ced4da, #2d2d34);

    /* Text Colors */
    --color-text-primary: var(--text-color);
    --color-text-secondary: light-dark(#495057, #a1a1aa);
    --color-text-muted: light-dark(#868e96, #71717a);

    /* Accent & Brand Colors */
    --color-accent-light: light-dark(#dca624, #f3d060);
    /* Gold gradient start */
    --color-accent-dark: light-dark(#9d7b0c, #b6921c);
    /* Gold gradient end */
    --color-accent: var(--accent-color);
    --color-accent-glow: light-dark(rgba(212, 175, 55, 0.06), rgba(212, 175, 55, 0.12));

    /* UI Details */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px -10px light-dark(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.4));
    --shadow-lg: 0 20px 40px -15px light-dark(rgba(212, 175, 55, 0.04), rgba(0, 0, 0, 0.6));
    --shadow-inset: inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.05));

    /* Typography using Poppins & Inter */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 6rem;

    /* Performance Transitions */
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    transition: background-color var(--transition-normal), color var(--transition-normal);
  }

  /* Custom Scrollbar */
  scrollbar-color: light-dark(#ced4da, #2d2d34) transparent;
  scrollbar-width: thin;

  /* ─── Typography Scale ─────────────────────────────────────────────────── */

  /* Headings — Poppins, fluid sizing with clamp() */
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-color);
    text-wrap: balance;
  }

  h1 {
    font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem);
    font-weight: 800;
  }

  h2 {
    font-size: clamp(1.875rem, 1.5rem + 2vw, 3rem);
    font-weight: 700;
  }

  h3 {
    font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
    font-weight: 600;
  }

  h4 {
    font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
    font-weight: 600;
  }

  h5 {
    font-size: 1.125rem;
    font-weight: 600;
  }

  h6 {
    font-size: 1rem;
    font-weight: 600;
  }

  /* Body — Inter, readable size and spacing */
  p {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 0.9rem + 0.15vw, 1.1rem);
    line-height: 1.75;
    color: var(--color-text-secondary);
    text-wrap: pretty;
  }

  /* Inline elements */
  strong,
  b {
    font-weight: 700;
    color: var(--text-color);
  }

  small {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
  }

  /* Accent-coloured links */
  a:not([class]) {
    color: var(--accent-color);
    text-decoration-color: color-mix(in oklab, var(--accent-color) 40%, transparent);
    text-underline-offset: 3px;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
  }

  a:not([class]):hover {
    text-decoration-color: var(--accent-color);
  }

  /* Custom selection */
  ::selection {
    background-color: var(--color-accent);
    color: light-dark(#ffffff, #000000);
  }

  /* Accessible focus indicators */
  :focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
  }
}

@layer layout {
  .container {
    max-inline-size: 1100px;
    margin-inline: auto;
    padding-inline: var(--space-md);
  }

  .grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
  }

  section {
    padding-block: var(--space-xl);
  }

  .section-header {
    margin-block-end: var(--space-lg);
    max-inline-size: 600px;

    h2 {
      font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
      margin-block-end: var(--space-xs);

      span {
        color: var(--color-accent);
      }
    }

    p {
      font-size: clamp(1rem, 0.95rem + 0.2vw, 1.15rem);
      text-wrap: pretty;
    }
  }
}

@layer components {

  /* Navigation Bar */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: light-dark(rgba(248, 249, 250, 0.8), rgba(9, 9, 11, 0.8));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background-color var(--transition-normal);
  }

  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity var(--transition-fast);
  }

  .logo .logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
  }

  [data-theme="dark"] .logo .logo-img {
    content: url("../assets/logo-full%20WOW.svg");
  }

  .logo-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text-primary);
  }

  .logo:hover {
    opacity: 0.9;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }

  .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding-block: var(--space-xs);
    transition: color var(--transition-fast);
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--color-accent-light), var(--color-accent-dark));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-normal);
  }

  .nav-link:hover {
    color: var(--color-text-primary);
  }

  .nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  /* Interactive Theme Toggle Button */
  .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    box-shadow: var(--shadow-sm), var(--shadow-inset);
    color: var(--color-text-secondary);
    transition: var(--transition-normal);
  }

  .theme-toggle:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-text-primary);
    border-color: var(--color-border-hover);
    transform: translateY(-1px);
  }

  .theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Sun/Moon SVGs rendering based on theme attribute */
  .theme-toggle .sun-icon {
    display: none;
  }

  .theme-toggle .moon-icon {
    display: block;
  }

  /* ─── Hero Section ─────────────────────────────────────────────────────── */
  .hero-section {
    position: relative;
    min-block-size: 100svh;
    /* full viewport, respects mobile bars */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    /* contain the glow layer */
  }

  /* Centered content stack */
  .hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
    position: relative;
    z-index: 1;
    padding-block: var(--space-xl);
  }

  /* ── Eyebrow badge ── */
  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: var(--radius-full);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    box-shadow: var(--shadow-sm), var(--shadow-inset);
  }

  .hero-badge .pulse {
    width: 7px;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--color-accent);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {

    0%,
    100% {
      opacity: 1;
      transform: scale(1);
      box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-accent) 50%, transparent);
    }

    60% {
      opacity: 0.9;
      transform: scale(1.1);
      box-shadow: 0 0 0 6px color-mix(in oklab, var(--color-accent) 0%, transparent);
    }
  }

  /* ── Main heading ── */
  .hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 2rem + 6vw, 7rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text-color);
    text-wrap: balance;
    max-inline-size: 18ch;
    /* keep line breaks intentional */
  }

  /* Accent color on "Stand Out" */
  .hero-accent {
    display: inline-block;
    color: var(--color-accent);
  }

  /* ── Service pills row ── */
  .hero-services {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 0.75rem;
    font-family: var(--font-sans);
    font-size: clamp(0.85rem, 0.8rem + 0.3vw, 1.05rem);
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;
    line-height: 1;
    margin-block: calc(var(--space-xs) * 0.5);
  }

  .hero-sep {
    color: var(--color-accent);
    font-size: 0.6em;
    opacity: 0.7;
    line-height: 1;
  }

  /* ── CTA row ── */
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
    margin-block-start: calc(var(--space-sm) * 0.5);
  }

  /* ── Shared button base ── */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition:
      transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      filter 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      background-color 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      border-color 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      color 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  }

  /* Primary — filled gold */
  .btn-primary {
    background: linear-gradient(135deg,
        var(--color-accent-light),
        var(--color-accent-dark));
    color: #000;
    box-shadow:
      0 4px 16px -4px color-mix(in oklab, var(--color-accent) 50%, transparent),
      var(--shadow-inset);
  }

  .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
      0 0 32px 4px color-mix(in oklab, var(--color-accent) 65%, transparent),
      0 12px 28px -4px color-mix(in oklab, var(--color-accent) 70%, transparent),
      var(--shadow-inset);
    filter: brightness(1.08);
  }

  .btn-primary:active {
    transform: translateY(0) scale(0.98);
    filter: brightness(0.97);
  }

  /* Secondary — ghost border */
  .btn-secondary {
    border: 1.5px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--text-color);
    box-shadow: var(--shadow-sm), var(--shadow-inset);
  }

  .btn-secondary:hover:not(:disabled) {
    border-color: var(--color-accent);
    background-color: var(--color-surface-hover);
    color: var(--color-accent);
    transform: translateY(-2px) scale(1.03);
    box-shadow:
      0 0 28px 2px color-mix(in oklab, var(--color-accent) 45%, transparent),
      var(--shadow-md),
      var(--shadow-inset);
  }

  .btn-secondary:active {
    transform: translateY(0) scale(0.98);
  }

  /* ── Ambient glow layer ── */
  .hero-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    /* radial gold haze centred in the section */
    background:
      radial-gradient(ellipse 70% 55% at 50% 60%,
        color-mix(in oklab, var(--color-accent) 8%, transparent),
        transparent 70%);
  }

  /* About Section Grid */
  .about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-lg);
    align-items: center;
  }

  .about-visual {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/5;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
  }

  .about-visual img {
    width: 100%;
    height: 100%;
    object-position: center;
  }

  .skills-container {
    margin-block-start: var(--space-md);
  }

  .skills-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-block-end: var(--space-sm);
  }

  .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .skill-badge {
    padding: 6px 14px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    box-shadow: var(--shadow-sm), var(--shadow-inset);
    transition: var(--transition-normal);
  }

  .skill-badge:hover {
    border-color: var(--color-accent);
    color: var(--color-text-primary);
    transform: translateY(-2px);
    box-shadow: 
      0 0 16px 2px color-mix(in oklab, var(--color-accent) 40%, transparent),
      var(--shadow-md);
  }

  /* Services Grid */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  @media (max-width: 992px) {
    .services-grid {
      grid-template-columns: 1fr;
    }
  }

  .service-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    box-shadow: var(--shadow-sm), var(--shadow-inset);
    transition:
      transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      border-color 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      background-color 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
  }

  .service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-light), var(--color-accent-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .service-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-lg);
    background-color: var(--color-surface-hover);
  }

  .service-card:hover::after {
    transform: scaleX(1);
  }

  .service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
  }

  .service-number {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-muted);
    opacity: 0.4;
    transition:
      opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      color 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .service-card:hover .service-number {
    color: var(--color-accent);
    opacity: 0.9;
  }

  .service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    background-color: var(--color-accent-glow);
    color: var(--color-accent);
    border: 1px solid color-mix(in oklab, var(--color-accent) 20%, transparent);
    flex-shrink: 0;
    transition:
      transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
      background-color 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .service-card:hover .service-icon {
    transform: scale(1.05);
    background-color: color-mix(in oklab, var(--color-accent) 15%, transparent);
  }

  .service-icon svg {
    width: 24px;
    height: 24px;
  }

  .service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
  }

  .service-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin: 0;
    flex-grow: 1;
  }

  .service-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-top: var(--space-xs);
  }

  /* Project Showcase */
  .project-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    background-color: transparent;
  }

  @media (max-width: 992px) {
    .project-showcase {
      grid-template-columns: 1fr;
      gap: var(--space-lg);
    }
  }

  .project-showcase-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    /* Smooth, blurred dark shadow in light mode using requested #0d0d0d */
    box-shadow: light-dark(0 20px 50px #0d0d0d40, var(--shadow-md));
    transform: translateZ(0);
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
  }

  .project-showcase:hover .project-showcase-image {
    box-shadow: light-dark(0 30px 60px #0d0d0d66, var(--shadow-lg));
  }

  .project-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .project-showcase-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .project-showcase-category {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
  }

  .project-showcase h3 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
  }

  .project-showcase p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
  }

  .project-showcase p:last-of-type {
    margin-bottom: var(--space-md);
  }

  .project-showcase-btn {
    margin-top: 0;
  }

  /* Structured Case Study Page */
  
  .cs-hero {
    padding-top: 100px; /* Space for nav */
    padding-bottom: 0;
  }
  
  .cs-hero-img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-md);
  }
  
  .cs-details {
    background-color: var(--color-surface);
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
  }
  
  .cs-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: start;
  }
  
  @media (min-width: 768px) {
    .cs-details-grid {
      grid-template-columns: 2fr 1fr;
      gap: var(--space-xl);
    }
  }
  
  .cs-heading {
    font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
    margin-bottom: var(--space-md);
  }
  
  .cs-subheading {
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
  }
  
  .cs-details p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
  }
  
  .cs-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
  }
  
  .cs-link:hover {
    text-decoration: underline;
  }
  
  .cs-gallery-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }
  
  @media (min-width: 768px) {
    .cs-gallery-header {
      flex-direction: row;
      align-items: center;
    }
    
    .cs-subtitle {
      margin-top: 0;
    }
  }
  
  .cs-subtitle {
    font-size: var(--font-small);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-top: var(--space-sm);
  }
  
  .cs-gallery-images {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
  }
  
  .cs-gallery-item {
    width: 100%;
    height: 90vh; /* Single screen frame */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .cs-gallery-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    /* Smooth, blurred dark shadow in light mode using requested #0d0d0d */
    box-shadow: light-dark(0 20px 50px #0d0d0d40, var(--shadow-md));
    border: none;
    transition: box-shadow var(--transition-normal);
  }

  .cs-gallery-img:hover {
    box-shadow: light-dark(0 25px 60px rgba(0, 0, 0, 0.25), var(--shadow-md));
  }

  /* Timeline */
  .timeline {
    position: relative;
    max-width: 800px;
    margin-inline: auto;
    padding-inline-start: var(--space-md);
  }

  .timeline::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: 2px;
    background-color: var(--color-border);
  }

  .timeline-item {
    position: relative;
    padding-inline-start: var(--space-lg);
    margin-block-end: var(--space-lg);
  }

  .timeline-item:last-child {
    margin-block-end: 0;
  }

  .timeline-marker {
    position: absolute;
    top: 5px;
    left: -2px;
    width: 14px;
    aspect-ratio: 1;
    border-radius: 50%;
    background-color: var(--color-bg);
    border: 3px solid var(--color-border);
    transition: border-color var(--transition-normal), background-color var(--transition-normal);
  }

  .timeline-item:hover .timeline-marker {
    border-color: var(--color-accent);
    background-color: var(--color-accent);
  }

  .timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-block-end: var(--space-xs);
  }

  .timeline-title {
    font-size: 1.2rem;
    margin-block-end: 2px;
  }

  .timeline-company {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-block-end: var(--space-xs);
  }

  .timeline-desc {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
  }

  /* Contact Form */
  .contact-wrapper {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-lg);
  }

  .contact-info {
    h3 {
      font-size: 1.35rem;
      margin-block-end: var(--space-sm);
    }

    p {
      margin-block-end: var(--space-md);
      font-size: 0.95rem;
    }
  }

  .contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .contact-detail-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.95rem;
  }

  .contact-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-accent);
  }

  .contact-icon-box svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
  }

  .contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm), var(--shadow-inset);
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
  }

  .form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
  }

  .form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: var(--color-surface);
  }

  .form-input:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
  }

  /* Validity Indicator using :user-invalid and :user-valid */
  .form-input:user-invalid {
    border-color: oklch(0.60 0.18 20);
    /* Coral / Red tone */
    background-color: light-dark(rgba(239, 68, 68, 0.02), rgba(239, 68, 68, 0.05));
  }

  textarea.form-input {
    resize: vertical;
    min-block-size: 120px;
  }

  .form-submit-btn {
    margin-block-start: var(--space-xs);
    width: fit-content;
  }

  .form-status {
    font-size: 0.9rem;
    margin-block-start: var(--space-xs);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    display: none;
  }

  .form-status.success {
    display: block;
    background-color: light-dark(rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.15));
    color: oklch(0.62 0.17 140);
    border: 1px solid oklch(0.62 0.17 140 / 0.3);
  }

  /* Footer */
  .footer {
    border-block-start: 1px solid var(--color-border);
    padding-block: var(--space-lg);
    background-color: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
  }

  .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .footer-socials {
    display: flex;
    gap: var(--space-sm);
  }

  .footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
  }

  .footer-social-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background-color: var(--color-surface-hover);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
      0 0 16px 2px color-mix(in oklab, var(--color-accent) 40%, transparent),
      var(--shadow-md);
  }

  .footer-social-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
  }
}

@layer utility {

  /* Inline Text Link Underline Animation */
  .text-link {
    position: relative;
    display: inline-block;
    color: var(--color-accent);
    font-weight: 500;
    transition: color var(--transition-fast);
  }

  .text-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .text-link:hover {
    color: var(--color-accent-hover, var(--color-accent));
  }

  .text-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  /* Mobile Overrides */
  @media (max-width: 768px) {
    :root {
      --space-xl: 4rem;
    }

    .nav-container {
      flex-wrap: wrap;
      height: auto;
      padding-block: var(--space-md);
      gap: var(--space-md);
      justify-content: center;
    }

    .nav-links {
      flex-wrap: wrap;
      justify-content: center;
      gap: var(--space-sm);
    }

    .nav-link {
      font-size: 0.85rem;
    }

    .hero-container {
      grid-template-columns: 1fr;
      text-align: center;
      gap: var(--space-md);
    }

    .hero-badge {
      justify-content: center;
    }

    .hero-desc {
      margin-inline: auto;
    }

    .hero-actions {
      justify-content: center;
    }

    .about-grid {
      grid-template-columns: 1fr;
    }

    .about-visual {
      max-width: 320px;
      margin-inline: auto;
      aspect-ratio: 1;
    }

    .contact-wrapper {
      grid-template-columns: 1fr;
    }
  }

  /* ── GSAP Hero: hide elements before animation fires (prevents FOUC) ── */
  .hero-badge,
  .hero-title,
  .hero-services,
  .hero-actions .btn,
  .hero-glow {
    opacity: 0;
    will-change: transform, opacity;
  }

  /* Once GSAP has set its own from-states, remove our CSS opacity so GSAP owns it */
  .gsap-ready .hero-badge,
  .gsap-ready .hero-title,
  .gsap-ready .hero-services,
  .gsap-ready .hero-actions .btn,
  .gsap-ready .hero-glow {
    opacity: revert;
    /* GSAP will control opacity from here */
  }

  /* Reduced Motion accessibility rules */
  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }

    .reveal {
      opacity: 1 !important;
      transform: none !important;
      transition: none !important;
    }

    /* Ensure hero elements are always visible under reduced motion */
    .hero-badge,
    .hero-title,
    .hero-services,
    .hero-actions .btn,
    .hero-glow {
      opacity: 1 !important;
      transform: none !important;
    }

    .creative-shape,
    .glow-ring {
      animation: none !important;
    }
  }
}