/* ==========================================================
   TOPRAK DEMIREL: PORTFOLIO / PROFESSIONAL EDITION
   Warm off-white paper, deep ink, muted navy accent.
   Instrument Serif display · DM Sans body · JetBrains Mono labels.
   No gradients.
   ========================================================== */

:root {
    /* Color: warm neutral canvas with a single restrained accent */
    --paper:        #f6f3ec;
    --paper-soft:   #eeeade;
    --surface:      #ffffff;
    --ink:          #16181d;
    --ink-soft:     #30343d;
    --muted:        #5d616c;
    --line:         rgba(22, 24, 29, 0.10);
    --line-strong:  rgba(22, 24, 29, 0.18);
    --accent:       #1e3a5f;   /* muted navy */
    --accent-soft:  #2d5280;
    --accent-tint:  rgba(30, 58, 95, 0.08);

    /* Focus + status (warm-tuned, single-accent) */
    --focus:        #1e3a5f;
    --success:      #2f7d4f;
    --error:        #b3261e;

    /* Shadows: soft, layered, never hard */
    --shadow-sm: 0 1px 2px rgba(22, 24, 29, 0.04),
                 0 2px 6px rgba(22, 24, 29, 0.04);
    --shadow-md: 0 2px 4px rgba(22, 24, 29, 0.04),
                 0 8px 24px rgba(22, 24, 29, 0.06);
    --shadow-lg: 0 4px 8px rgba(22, 24, 29, 0.05),
                 0 24px 56px rgba(22, 24, 29, 0.10);
    --shadow-hover: 0 6px 14px rgba(22, 24, 29, 0.06),
                    0 32px 72px rgba(22, 24, 29, 0.12);

    /* Type */
    --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
    --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Radii */
    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;
    --r-xl: 28px;

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern", "liga", "ss01";
    overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }

::selection { background: var(--accent); color: var(--paper); }

/* ---------- Accessibility: visible keyboard focus + skip link ---------- */
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1100;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    transform: translateY(-160%);
    transition: transform 200ms var(--ease);
}
.skip-link:focus {
    transform: translateY(0);
    outline: 2px solid var(--paper);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ==========================================================
   NAVBAR
   ========================================================== */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    background: rgba(246, 243, 236, 0.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 300ms var(--ease),
                background 300ms var(--ease),
                box-shadow 300ms var(--ease);
}

.navbar.scrolled {
    background: rgba(246, 243, 236, 0.94);
    border-bottom-color: var(--line);
    box-shadow: 0 1px 0 rgba(22, 24, 29, 0.02), 0 10px 30px rgba(22, 24, 29, 0.04);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 32px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    transition: transform 400ms var(--ease), background 300ms var(--ease);
}

.logo:hover .logo-mark {
    transform: rotate(-6deg);
    background: var(--accent);
}

.logo-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links > a,
.dropdown-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-soft);
    border-radius: 999px;
    transition: color 220ms var(--ease), background 220ms var(--ease);
}

.nav-links > a:hover,
.dropdown-trigger:hover {
    color: var(--ink);
    background: var(--accent-tint);
}

.arrow {
    display: inline-block;
    font-size: 10px;
    line-height: 1;
    transition: transform 220ms var(--ease);
}

/* Dropdowns */
.dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 220px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 240ms var(--ease), transform 260ms var(--ease), visibility 240ms;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown:hover .dropdown-trigger .arrow,
.dropdown.open .dropdown-trigger .arrow {
    transform: rotate(180deg);
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--ink-soft);
    border-radius: 8px;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}

.dropdown-menu a:hover {
    background: var(--accent-tint);
    color: var(--accent);
}

/* Language switcher */
.lang-switcher {
    position: relative;
    margin-left: 8px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    transition: border-color 220ms var(--ease), background 220ms var(--ease);
}

.lang-btn:hover {
    border-color: var(--ink);
    background: var(--surface);
}

.current-lang { letter-spacing: 0.04em; }

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 240ms var(--ease), transform 240ms var(--ease), visibility 240ms var(--ease);
}

.lang-switcher:hover .lang-menu,
.lang-switcher:focus-within .lang-menu,
.lang-switcher.open .lang-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--ink-soft);
    border-radius: 8px;
    transition: background 200ms var(--ease), color 200ms var(--ease);
}

.lang-menu button:hover,
.lang-menu button.active {
    background: var(--accent-tint);
    color: var(--accent);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 300ms var(--ease), opacity 200ms var(--ease);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 78px 0 auto 0;
    background: var(--paper);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    z-index: 999;
    border-bottom: 1px solid transparent;
    transition: max-height 400ms var(--ease), opacity 300ms var(--ease), border-color 300ms var(--ease);
}

.mobile-menu.active {
    max-height: calc(100vh - 78px);
    opacity: 1;
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-md);
}

.mobile-menu > a,
.mobile-dropdown-trigger {
    padding: 14px 16px;
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
    border-radius: var(--r-md);
    transition: background 200ms var(--ease);
}

.mobile-menu > a:hover,
.mobile-dropdown-trigger:hover {
    background: var(--accent-tint);
}

.mobile-dropdown { display: block; }

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    padding-left: 16px;
    transition: max-height 300ms var(--ease);
}

.mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 400px;
}

.mobile-dropdown.active .mobile-dropdown-trigger .arrow {
    transform: rotate(180deg);
}

.mobile-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--muted);
    border-radius: var(--r-sm);
}

.mobile-dropdown-menu a:hover {
    color: var(--accent);
}

.mobile-lang-switcher {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 0 16px;
}

.mobile-lang-switcher button {
    flex: 1;
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    transition: color 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease);
}

.mobile-lang-switcher button.active {
    color: var(--paper);
    background: var(--ink);
    border-color: var(--ink);
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
    position: relative;
    padding: 120px 0 132px;
    overflow: clip;
}

.hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 80px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
    animation: fade-up 800ms var(--ease-out) both;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
    50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.05); }
}

.hero-heading {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fade-up 900ms var(--ease-out) 120ms both;
}

.hero-greeting {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.hero-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3.2rem, 7vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.035em;
    color: var(--ink);
    overflow-wrap: anywhere;
    min-width: 0;
}

.hero-tagline {
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    line-height: 1.3;
    color: var(--accent);
    animation: fade-up 900ms var(--ease-out) 220ms both;
}

.hero-tagline em {
    font-style: italic;
}

.hero-description {
    margin-top: 24px;
    max-width: 520px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-soft);
    animation: fade-up 900ms var(--ease-out) 320ms both;
}

.hero-actions {
    margin-top: 40px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fade-up 900ms var(--ease-out) 420ms both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 28px;
    font-size: 14.5px;
    font-weight: 500;
    letter-spacing: 0.005em;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 300ms var(--ease),
                background 260ms var(--ease),
                border-color 260ms var(--ease),
                color 260ms var(--ease),
                box-shadow 260ms var(--ease);
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    border-color: var(--ink);
    background: var(--surface);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: var(--shadow-sm);
}

.hero-socials {
    margin-top: 40px;
    display: flex;
    gap: 12px;
    align-items: center;
    animation: fade-up 900ms var(--ease-out) 520ms both;
}

.hero-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    transition: color 280ms var(--ease), background 280ms var(--ease), border-color 280ms var(--ease), transform 280ms var(--ease), box-shadow 280ms var(--ease);
}

.hero-socials a svg {
    width: 18px;
    height: 18px;
}

.hero-socials a:hover {
    color: var(--paper);
    background: var(--ink);
    border-color: var(--ink);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Hero portrait */
.hero-figure {
    position: relative;
    animation: fade-in 1200ms var(--ease-out) 300ms both;
}

.hero-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--paper-soft);
    box-shadow: var(--shadow-lg);
    transform: rotate(1.2deg);
    transition: transform 600ms var(--ease);
}

.hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--line);
    pointer-events: none;
}

.hero-photo:hover { transform: rotate(0deg) scale(1.01); }

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transform: scale(1.25);
    transform-origin: center 30%;
    filter: saturate(0.96) contrast(1.02);
}

/* ==========================================================
   FEATURED CAROUSEL
   ========================================================== */
.featured {
    position: relative;
    z-index: 1;
    padding: 120px 0 60px;
}

.featured-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 48px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.featured-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--ink);
    overflow-wrap: anywhere;
    min-width: 0;
}

.featured-all {
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    transition: color 220ms var(--ease);
}

.featured-all:hover { color: var(--accent); }

.carousel-nav {
    display: flex;
    gap: 10px;
}

.carousel-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 280ms var(--ease), background 280ms var(--ease), border-color 280ms var(--ease), transform 280ms var(--ease), box-shadow 280ms var(--ease);
}

.carousel-btn svg { width: 18px; height: 18px; }

.carousel-btn:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xl);
}

.carousel-track {
    display: flex;
    transition: transform 720ms var(--ease-out);
    will-change: transform;
}

.project-card {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.project-card-visual {
    position: relative;
    background: var(--paper-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    overflow: hidden;
}

.project-card-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, var(--line-strong) 1px, transparent 0);
    background-size: 22px 22px;
    opacity: 0.5;
}

.project-card-num {
    position: relative;
    font-family: var(--font-display);
    font-size: clamp(8rem, 16vw, 14rem);
    line-height: 1;
    color: var(--ink);
    font-style: italic;
    letter-spacing: -0.04em;
    mix-blend-mode: multiply;
    opacity: 0.92;
}

.card-content {
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.card-tag {
    display: inline-block;
    width: fit-content;
    padding: 6px 12px;
    background: var(--accent-tint);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
}

.card-content h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.card-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 52ch;
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.card-tech span {
    padding: 6px 12px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-soft);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.dot {
    width: 28px;
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
    padding: 0;
    transition: background 300ms var(--ease), width 300ms var(--ease);
}

.dot.active {
    background: var(--ink);
    width: 48px;
}

.dot:hover:not(.active) {
    background: var(--ink-soft);
}

/* ==========================================================
   SECTION HEADS: shared
   ========================================================== */
.section-head {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 72px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.section-index {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    flex-shrink: 0;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.025em;
    color: var(--ink);
    overflow-wrap: anywhere;
    min-width: 0;
}

/* ==========================================================
   ABOUT
   ========================================================== */
.about {
    padding: 140px 0;
    background: var(--paper);
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 80px;
}

.about-text .lead {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 1.6rem);
    line-height: 1.45;
    color: var(--ink);
    margin-bottom: 28px;
    letter-spacing: -0.005em;
}

.about-text p {
    font-size: 16.5px;
    line-height: 1.75;
    color: var(--ink-soft);
    margin-bottom: 24px;
}

.about-text h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.7rem;
    color: var(--ink);
    margin-top: 48px;
    margin-bottom: 16px;
    letter-spacing: -0.015em;
    display: flex;
    align-items: center;
    gap: 14px;
}

.about-text h3::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.about-skills {
    position: sticky;
    top: 110px;
    align-self: start;
    padding: 36px 32px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}

.about-skills > h3 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 28px;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.skill-category.full-width {
    grid-column: 1 / -1;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.skill-category h4 {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 16px;
    letter-spacing: 0.005em;
}

.skill-list-icons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-list-icons li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--ink-soft);
    padding: 8px 12px;
    border-radius: var(--r-sm);
    transition: background 240ms var(--ease), transform 240ms var(--ease);
}

.skill-list-icons li:hover {
    background: var(--paper-soft);
    transform: translateX(3px);
}

.skill-list-icons small {
    color: var(--muted);
    font-size: 12px;
}

.flag-icon {
    width: 26px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.skill-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    object-fit: contain;
}

.tools-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px !important;
}

.tools-grid li {
    padding: 10px 12px;
}

/* ==========================================================
   PROJECTS GRID
   ========================================================== */
.projects {
    padding: 140px 0;
    background: var(--paper-soft);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.project-item {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 420ms var(--ease), box-shadow 420ms var(--ease), border-color 300ms var(--ease);
}

.project-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--line-strong);
}

.project-image {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--paper-soft);
    overflow: hidden;
}

.project-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, var(--line-strong) 1px, transparent 0);
    background-size: 18px 18px;
    opacity: 0.55;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease);
}

.project-item:hover .project-image img {
    transform: scale(1.04);
}

.project-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder span {
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(5rem, 10vw, 8rem);
    color: var(--ink);
    opacity: 0.85;
    mix-blend-mode: multiply;
    letter-spacing: -0.04em;
}

.project-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-tag {
    display: inline-block;
    width: fit-content;
    padding: 5px 11px;
    background: var(--accent-tint);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
}

.project-info h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.7rem;
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -0.015em;
}

.project-info p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-soft);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tech span {
    padding: 5px 10px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-soft);
}

.project-links {
    display: flex;
    gap: 20px;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid var(--line);
}

.project-link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
    position: relative;
    padding-bottom: 2px;
    transition: color 240ms var(--ease);
}

.project-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 320ms var(--ease);
}

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

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

/* ==========================================================
   CONTACT
   ========================================================== */
.contact {
    padding: 140px 0;
    background: var(--paper);
}

.contact .section-head { margin-bottom: 28px; }

.contact-intro {
    max-width: 640px;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.5;
    color: var(--ink-soft);
    margin-bottom: 64px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 40px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}

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

.form-group label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color 240ms var(--ease), background 240ms var(--ease);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--accent-tint);
}

.form-group input:user-invalid,
.form-group textarea:user-invalid {
    border-color: var(--error);
}

.contact-form .btn {
    align-self: flex-start;
    margin-top: 8px;
}

.form-status {
    min-height: 1.2em;
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.form-status[data-state="success"] { color: var(--success); }
.form-status[data-state="error"] { color: var(--error); }

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 36px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.contact-item h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.contact-item a,
.contact-item p {
    font-size: 16px;
    color: var(--ink);
    transition: color 240ms var(--ease);
}

.contact-item a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 12px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: color 260ms var(--ease), background 260ms var(--ease), border-color 260ms var(--ease), transform 260ms var(--ease), box-shadow 260ms var(--ease);
}

.social-links a svg { width: 17px; height: 17px; }

.social-links a:hover {
    color: var(--paper);
    background: var(--ink);
    border-color: var(--ink);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.footer p {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--muted);
}

/* ==========================================================
   MOTION
   ========================================================== */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* IntersectionObserver hooks from script.js */
.about,
.projects,
.contact {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}

.about.visible,
.projects.visible,
.contact.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out), box-shadow 420ms var(--ease), border-color 300ms var(--ease);
}

.project-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-item.visible:nth-child(2) { transition-delay: 80ms; }
.project-item.visible:nth-child(3) { transition-delay: 160ms; }
.project-item.visible:nth-child(4) { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1024px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 56px;
    }
    .hero-figure { max-width: 420px; }
    .about-content { grid-template-columns: 1fr; gap: 56px; }
    .about-skills { position: static; }
    .contact-content { grid-template-columns: 1fr; gap: 40px; }
    .project-card { grid-template-columns: 1fr; }
    .project-card-visual { min-height: 280px; }
    .card-content { padding: 40px 32px; }
}

@media (max-width: 768px) {
    .container { padding: 0 24px; }
    .nav-container { padding: 16px 24px; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .logo-name { display: none; }

    .hero { padding: 140px 0 80px; }
    .hero::before { width: 360px; height: 360px; }

    .hero-heading { margin-top: 24px; }
    .hero-actions { gap: 10px; }
    .btn { padding: 14px 22px; font-size: 14px; }

    .featured { padding: 80px 0 20px; }
    .featured-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 48px;
    }

    .about, .projects, .contact { padding: 90px 0; }

    .projects-grid { grid-template-columns: 1fr; gap: 24px; }
    .project-info { padding: 24px; }

    .contact-form { padding: 28px; }
    .contact-info { padding: 28px; }

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

    .card-content { padding: 32px 24px; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
    .tools-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ==================== */
/* Notemage: project card logo visual + ongoing badge */
/* ==================== */
.project-card-visual--logo { padding: 40px; }
.project-card-visual--logo::before { opacity: 0.35; }
.project-card-logo {
    position: relative;
    max-width: 78%;
    max-height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.08));
}

.project-image--logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--paper-soft);
}
.project-image--logo img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.card-tag--ongoing,
.project-tag--ongoing {
    background: #fef3c7;
    color: #92400e;
    position: relative;
    padding-left: 22px;
}
.card-tag--ongoing::before,
.project-tag--ongoing::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.card-links {
    display: flex;
    gap: 20px;
    margin-top: 6px;
}
