/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (CSS Variables)
   ========================================================================== */
:root {
    --bg: #0b0c10;
    --surface: #111317;
    --text: #e6e6e6;
    --muted: #a9b0b8;
    --border: #1d222b;
    --brand: #5dd3ff;
    --brand-2: #8ef6d4;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark light;
}

/* Light mode system preference */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #ffffff;
        --surface: #f6f8fb;
        --text: #111317;
        --muted: #4a5568;
        --border: #e6eaf0;
    }
}

/* Manual theme overrides */
html[data-theme="light"] :root {
    --bg: #ffffff;
    --surface: #f6f8fb;
    --text: #111317;
    --muted: #4a5568;
    --border: #e6eaf0;
}

html[data-theme="dark"] :root {
    --bg: #0b0c10;
    --surface: #111317;
    --text: #e6e6e6;
    --muted: #a9b0b8;
    --border: #1d222b;
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial;
    background: radial-gradient(1200px 1200px at 10% -10%, color-mix(in oklab, var(--brand) 10%, transparent) 0%, transparent 60%), var(--bg);
    color: var(--text);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

/* ==========================================================================
   3. MOTION PREFERENCES (Accessibility)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   4. UTILITY CLASSES (Layout Helpers)
   ========================================================================== */
.container {
    width: min(1100px, 92vw);
    margin-inline: auto;
}

.section {
    padding: clamp(56px, 8vw, 100px) 0;
}

/* ==========================================================================
   5. PREMIUM 3D BUTTONS (Interactive Components)
   ========================================================================== */
.btn {
    --btn-bg: var(--surface);
    --btn-brd: var(--border);
    --btn-fg: var(--text);
    position: relative;
    display: inline-block;
    padding: 14px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--btn-fg);
    background: var(--btn-bg);
    border: 2px solid var(--btn-brd);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transform: translateY(0);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.15),
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius);
    padding: 2px;
    background: linear-gradient(45deg, 
        color-mix(in oklab, var(--brand) 20%, transparent),
        color-mix(in oklab, var(--brand-2) 20%, transparent));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 12px 24px rgba(0,0,0,0.25),
        0 6px 12px rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        0 2px 4px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: color-mix(in oklab, var(--brand) 50%, transparent);
    color: #0b0c10 !important;
    text-shadow: none;
    box-shadow: 
        0 6px 20px color-mix(in oklab, var(--brand) 25%, transparent),
        0 3px 8px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn-primary::before {
    background: linear-gradient(45deg, 
        color-mix(in oklab, #0b0c10 30%, transparent),
        color-mix(in oklab, var(--brand) 30%, transparent));
}

.btn-primary:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 16px 32px color-mix(in oklab, var(--brand) 35%, transparent),
        0 8px 16px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.5);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        0 4px 12px color-mix(in oklab, var(--brand) 20%, transparent),
        inset 0 2px 6px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: color-mix(in oklab, var(--surface), transparent 5%);
    border-color: color-mix(in oklab, var(--border) 80%, transparent);
}

.btn-secondary:hover {
    background: color-mix(in oklab, var(--surface), transparent 0%);
    border-color: var(--brand);
}

/* 3D GLOW EFFECT */
.btn-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(from 0deg, 
        transparent 0deg, 
        var(--brand) 90deg, 
        transparent 180deg, 
        var(--brand-2) 270deg, 
        transparent);
    border-radius: calc(var(--radius) + 2px);
    z-index: -2;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.btn:hover.btn-glow::after,
.btn-primary:hover.btn-glow::after {
    opacity: 1;
}

@keyframes btn-press {
    0% { transform: translateY(-2px) scale(1); }
    50% { transform: translateY(0) scale(0.98); }
    100% { transform: translateY(0) scale(1); }
}

.btn:active {
    animation: btn-press 0.15s ease-out;
}

/* ==========================================================================
   6. SKIP LINK (Accessibility)
   ========================================================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: top .2s;
    z-index: 1000;
}

.skip-link:focus {
    top: 8px;
}

/* ==========================================================================
   7. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: color-mix(in oklab, var(--bg), transparent 20%);
    border-bottom: 1px solid var(--border);
}

.navbar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    width: min(1100px, 92vw);
    margin-inline: auto;
    padding: 12px 0;
}

.nav-logo {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    letter-spacing: .3px;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: clamp(8px, 3vw, 28px);
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link:focus-visible {
    border-color: var(--border);
    background: color-mix(in oklab, var(--surface), transparent 10%);
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.nav-toggle {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.nav-toggle .bar {
    width: 20px;
    height: 2px;
    background: var(--text);
    display: block;
}

.nav-toggle .bar+.bar {
    margin-top: 3px;
}

/* ==========================================================================
   8. HERO SECTION
   ========================================================================== */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: clamp(20px, 5vw, 60px);
    align-items: center;
}

.hero-title {
    font-size: clamp(32px, 6vw, 56px);
    line-height: 1.05;
    margin: 0 0 10px;
}

.highlight {
    color: var(--brand);
    text-shadow: 0 6px 22px color-mix(in oklab, var(--brand) 30%, transparent);
}

.hero-subtitle {
    margin: 0 0 10px;
    font-weight: 600;
    color: var(--muted);
}

.hero-description {
    margin: 0 0 22px;
    max-width: 56ch;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-figure {
    margin: 0;
    justify-self: center;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero-figure img {
    aspect-ratio: 1/1;
    object-fit: cover;
}

/* ==========================================================================
   9. ABOUT SECTION - ULTRA ENHANCED
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr .7fr;
    gap: clamp(20px, 4vw, 48px);
}

.stats {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    perspective: 1000px;
}

.stat {
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        color-mix(in oklab, var(--brand) 15%, transparent), 
        color-mix(in oklab, var(--brand-2) 10%, transparent),
        transparent);
    transition: left 0.8s ease;
}

.stat:hover::before {
    left: 100%;
    animation: shimmerLoop 2s infinite;
}

@keyframes shimmerLoop {
    0% { left: -100%; }
    100% { left: 100%; }
}

.stat-num {
    display: block;
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    min-height: 1.3em;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.stat-label {
    color: var(--muted);
    font-size: 14px;
    margin-top: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.icon-card {
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: radial-gradient(600px 400px at 20% -10%, color-mix(in oklab, var(--brand) 12%, transparent) 0%, transparent 60%), var(--surface);
    border-radius: 18px;
    height: 220px;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

.icon-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(93, 211, 255, 0.2);
}

/* ==========================================================================
   10. SKILLS SECTION - SLIDING ANIMATION
   ========================================================================== */
#skills .skills-grid {
    display: grid !important;
    gap: 24px !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
}

#skills .skill-category {
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    border-radius: var(--radius) !important;
    padding: 24px !important;
    position: relative !important;
}

#skills .skill-title {
    margin: 0 0 20px 0 !important;
    font-size: 20px !important;
    color: var(--text) !important;
    text-align: center !important;
    font-weight: 600 !important;
}

#skills .skill-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 16px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#skills .skill-card {
    position: relative !important;
    height: 85px !important;
    border-radius: var(--radius) !important;
    overflow: hidden !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#skills .skill-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4) !important;
}

#skills .card-top {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    z-index: 1 !important;
    color: #0b0c10 !important;
    text-align: center !important;
    font-weight: 600 !important;
}

#skills .card-top i {
    font-size: 1.8rem !important;
    margin-bottom: 4px !important;
    color: #0b0c10 !important;
}

#skills .card-top span {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
}

#skills .card-bottom {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    transform: translateY(100%) !important;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    z-index: 2 !important;
    border: 1px solid var(--border) !important;
}

#skills .skill-card:hover .card-top {
    transform: translateY(-100%) !important;
}

#skills .skill-card:hover .card-bottom {
    transform: translateY(0) !important;
}

/* ==========================================================================
   11. PROJECTS SECTION
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    position: relative;
    container-type: inline-size;
}

.project-card {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 16px;
    overflow: clip;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #0002;
}

.project-content {
    padding: 14px;
    display: grid;
    gap: 6px;
}

.project-title {
    margin: 4px 0 0;
    font-size: 18px;
}

.project-description {
    margin: 0 0 8px;
    color: var(--muted);
}

.project-link {
    justify-self: start;
    text-decoration: none;
    color: #0b0c10;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

/* PROJECT HOVER EFFECTS */
.projects-grid:hover .project-card:not(:hover) {
    filter: blur(1px);
    transform: translateY(4px);
    opacity: 0.6;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 25px 50px -12px rgba(128, 128, 128, 0.25),
        0 10px 20px -8px rgba(128, 128, 128, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10;
    filter: none;
    opacity: 1;
}

/* ==========================================================================
   12. PREMIUM CONTACT SECTION - ULTRA ENHANCED ✨
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(18px, 4vw, 36px);
}

/* PREMIUM CONTACT METHODS */
.contact-methods {
    list-style: none;
    padding: 0;
    margin: 16px 0 18px;
    display: grid;
    gap: 14px;
}

.contact-method {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
    border: 2px solid var(--border);
    background: 
        radial-gradient(circle at 20px 20px, color-mix(in oklab, var(--brand) 8%, transparent) 0%, transparent 50%),
        var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.contact-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        color-mix(in oklab, var(--brand) 12%, transparent), 
        transparent);
    transition: left 0.6s ease;
}

.contact-method:hover::before {
    left: 100%;
}

.contact-method:hover {
    transform: translateX(8px) translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(93, 211, 255, 0.25),
        0 12px 24px rgba(0,0,0,0.3);
    border-color: color-mix(in oklab, var(--brand) 50%, transparent);
}

.contact-method i {
    color: var(--brand);
    font-size: 1.4rem;
    background: radial-gradient(circle, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(93, 211, 255, 0.3));
}

/* ULTRA-PREMIUM SOCIAL LINKS */
.social-links {
    display: flex;
    position: relative;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 28px 0;
    perspective: 1000px;
}

.social-link {
    width: 90px;
    height: 90px;
    text-align: center;
    line-height: 90px;
    font-size: 38px;
    margin: 0 10px;
    display: block;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    background: 
        radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--brand) 12%, transparent) 0%, transparent 50%),
        color-mix(in oklab, var(--surface), transparent 15%);
    color: var(--text);
    text-decoration: none;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    z-index: 1;
    background-clip: padding-box;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255,255,255,0.05);
    transform-style: preserve-3d;
}

.social-link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 4px;
    background: conic-gradient(from 0deg, 
        transparent 0deg, 
        var(--brand) 90deg, 
        transparent 180deg, 
        var(--brand-2) 270deg, 
        transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    z-index: -1;
}

.social-link .icon {
    position: relative;
    color: color-mix(in oklab, var(--text) 90%, var(--brand));
    transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
    filter: drop-shadow(0 3px 6px rgba(93, 211, 255, 0.3));
    z-index: 3;
    transform-style: preserve-3d;
}

.social-link:hover {
    transform: translateY(-16px) scale(1.12) rotateX(10deg) rotateY(5deg);
    background: 
        radial-gradient(circle at 30% 30%, color-mix(in oklab, var(--brand) 20%, transparent) 0%, transparent 50%),
        color-mix(in oklab, var(--surface), transparent 5%);
    box-shadow: 
        0 30px 60px rgba(93, 211, 255, 0.4),
        0 16px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 0 40px rgba(93, 211, 255, 0.3);
}

.social-link:hover::before {
    opacity: 1;
    padding: 0;
    transform: rotate(360deg);
    animation: spinBorder 2s linear infinite;
}

.social-link:hover .icon {
    color: #ffffff !important;
    filter: 
        drop-shadow(0 0 16px rgba(255, 255, 255, 0.9))
        drop-shadow(0 0 32px rgba(93, 211, 255, 0.8));
    transform: scale(1.3) rotateY(1080deg);
}

/* Brand-specific premium gradients */
.social-links a:nth-child(1):hover { 
    background: radial-gradient(circle at 30% 30%, #24292e 0%, transparent 50%), 
                linear-gradient(135deg, #39414a 0%, #21262d 100%); 
}
.social-links a:nth-child(2):hover { 
    background: radial-gradient(circle at 30% 30%, #0077b5 0%, transparent 50%), 
                linear-gradient(135deg, #005c8d 0%, #00619c 100%); 
}
.social-links a:nth-child(3):hover { 
    background: radial-gradient(circle at 30% 30%, #1d9bf0 0%, transparent 50%), 
                linear-gradient(135deg, #0d7af0 0%, #1a8cd8 100%); 
}
.social-links a:nth-child(4):hover { 
    background: radial-gradient(circle at 30% 30%, #3b5999 0%, transparent 50%), 
                linear-gradient(135deg, #2d4474 0%, #1e2e4f 100%); 
}
.social-links a:nth-child(5):hover { 
    background: radial-gradient(circle at 30% 30%, #e4405f 0%, transparent 50%), 
                linear-gradient(135deg, #f77737 0%, #c13584 30%, #e1306c 70%, #fd1d1d 100%); 
}

@keyframes socialFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-6px) scale(1.03); }
}

@keyframes spinBorder {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.social-links {
    animation: socialFloat 7s ease-in-out infinite;
}

/* PREMIUM FORM ENHANCEMENTS */
.contact-form {
    display: grid;
    gap: 16px;
    border: 2px solid var(--border);
    background: 
        radial-gradient(ellipse at top left, color-mix(in oklab, var(--brand) 6%, transparent) 0%, transparent 60%),
        var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand));
    border-radius: var(--radius) var(--radius) 0 0;
}

.form-group {
    display: grid;
    gap: 8px;
    position: relative;
}

label {
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
    letter-spacing: 0.3px;
}

input,
select,
textarea {
    width: 100%;
    padding: 16px 16px;
    border-radius: var(--radius);
    background: color-mix(in oklab, var(--surface), transparent 12%);
    border: 2px solid var(--border);
    color: var(--text);
    outline: none;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--brand);
    box-shadow: 
        0 0 0 4px color-mix(in oklab, var(--brand) 30%, transparent),
        0 8px 25px rgba(93, 211, 255, 0.2);
    transform: translateY(-2px);
    background: color-mix(in oklab, var(--surface), transparent 5%);
}

.form-row {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
}

.form-note {
    font-size: 14px;
    color: var(--muted);
    font-style: italic;
}

.form-status {
    display: none;
    border-radius: var(--radius);
    padding: 16px;
    border: 2px solid transparent;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.form-status.success {
    display: block;
    border-color: #1f8b4c;
    background: linear-gradient(135deg, color-mix(in oklab, #1f8b4c 15%, transparent), transparent),
                color-mix(in oklab, #1f8b4c 8%, var(--surface));
    color: #e7ffef;
    box-shadow: 0 8px 25px rgba(31, 139, 76, 0.3);
}

.form-status.error {
    display: block;
    border-color: #a13b3b;
    background: linear-gradient(135deg, color-mix(in oklab, #a13b3b 15%, transparent), transparent),
                color-mix(in oklab, #a13b3b 8%, var(--surface));
    color: #fff0f0;
    box-shadow: 0 8px 25px rgba(161, 59, 59, 0.3);
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 18px 0;
    text-align: center;
    color: var(--muted);
}

/* ==========================================================================
   14. MISC UTILITIES & ANIMATIONS
   ========================================================================== */
.text {
    width: fit-content;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sch,
.typing {
    font-size: 23px;
}

.typing {
    color: aqua;
    min-width: 10ch;
    border-right: 2px solid aqua;
    animation: blink 1s infinite;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes blink {
    0%, 50% { border-color: aqua; }
    51%, 100% { border-color: transparent; }
}

/* ==========================================================================
   15. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
.nav-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: grid;
    }
}

@media (max-width: 820px) {
    .navbar {
        grid-template-columns: 1fr auto auto;
    }

    .nav-menu {
        grid-column: 1 / -1;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        display: none;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 0 0 14px 14px;
        padding: 10px;
        z-index: 999;
    }

    .nav-menu.open {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    #skills .skills-grid {
        grid-template-columns: 1fr !important;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .stat {
        padding: 18px;
    }
}

@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .social-link {
        width: 72px;
        height: 72px;
        line-height: 72px;
        font-size: 32px;
        margin: 0 8px;
    }
    
    .social-link:hover {
        transform: translateY(-10px) scale(1.08);
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .btn-primary:hover {
        transform: translateY(-3px) scale(1.01);
    }

    .stats {
        gap: 10px;
    }
    
    .stat {
        padding: 14px;
    }
    
    .stat-num {
        font-size: 22px;
    }

    .contact-method {
        padding: 16px;
        gap: 12px;
    }
}

@container (max-width: 480px) {
    .project-image {
        height: 150px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .social-link,
    .social-link .icon,
    .social-link::before,
    .contact-method,
    .btn {
        transition: none !important;
        animation: none !important;
    }
    
    .social-link:hover,
    .contact-method:hover {
        transform: none;
    }
}

/* ==========================================================================
   End of styles.css - Premium Contact Section Fully Enhanced ✨
   ========================================================================== */
