/* ==========================================
   CSS Variables & Design Tokens
   ========================================== */

/* ==========================================
   Splash / Cover Screen
   ========================================== */
body.splash-active {
    overflow: hidden;
}

.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #030305;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    clip-path: circle(150% at 50% 50%);
    transition: clip-path 0.9s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.8s ease;
}

.splash.exit {
    clip-path: circle(0% at 50% 50%);
    opacity: 0;
    pointer-events: none;
}

/* CRT scanline overlay */
.splash-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    pointer-events: none;
    z-index: 2;
}

/* Floating particles container */
.splash-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.splash-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(251, 191, 36, 0.4);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

.splash-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    width: 100%;
    max-width: 540px;
    transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.6s ease;
}

.splash.exit .splash-content {
    transform: scale(0.85);
    opacity: 0;
}

/* Portfolio Logo */
.splash-logo {
    opacity: 0;
    transform: scale(0.8);
    animation: splashLogoIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem; /* Added space between logo and bios boot terminal */
}

@keyframes splashLogoIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.splash-logo-bracket {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #fbbf24;
    animation: logoPulse 3s ease-in-out infinite;
}

.splash-logo-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #f59e0b 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

@keyframes logoPulse {
    0%, 100% { text-shadow: 0 0 10px rgba(251, 191, 36, 0.3); }
    50% { text-shadow: 0 0 25px rgba(251, 191, 36, 0.6); }
}

/* Boot sequence terminal */
.splash-terminal {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    width: 100%;
}

.splash-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    line-height: 1.6;
    min-height: 1.8em;
}

/* Typewriter cursor on the active typing line */
.splash-line .s-cursor {
    display: inline-block;
    width: 7px;
    height: 1em;
    background: #fbbf24;
    margin-left: 1px;
    animation: splashCursorBlink 0.6s step-end infinite;
    vertical-align: text-bottom;
}

.splash-line .s-cursor.done {
    display: none;
}

@keyframes splashCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.s-prompt {
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    flex-shrink: 0;
    min-width: 44px;
    text-align: center;
}

.s-text {
    color: #71717a;
    font-size: 0.78rem;
}

.s-ok {
    color: #34d399;
    font-weight: 600;
}

.s-highlight {
    color: #f59e0b;
}

/* INITIALIZE Button */
.splash-btn {
    position: relative;
    background: transparent;
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 0.9rem 2.5rem;
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.splash-btn.show {
    visibility: visible;
    animation: btnReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes btnReveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.splash-btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #fbbf24;
    transition: color 0.3s;
}

.splash-btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 12px;
}

.splash-btn:hover {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.2),
                0 0 60px rgba(251, 191, 36, 0.1),
                inset 0 0 20px rgba(251, 191, 36, 0.05);
    transform: translateY(-2px);
}

.splash-btn:hover .splash-btn-glow {
    opacity: 1;
}

.splash-btn:hover .splash-btn-text {
    color: #fff;
}

.splash-btn:active {
    transform: scale(0.97);
}

/* Subtle breathing border animation on button */
.splash-btn.show {
    animation: btnReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               btnBreath 3s ease-in-out 1.5s infinite;
}

@keyframes btnBreath {
    0%, 100% {
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.05);
        border-color: rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(251, 191, 36, 0.15);
        border-color: rgba(251, 191, 36, 0.5);
    }
}

@media (max-width: 480px) {
    .splash-hex {
        width: 75px;
        height: 90px;
    }
    .splash-terminal {
        gap: 0.4rem;
    }
    .splash-line {
        font-size: 0.72rem;
    }
    .s-prompt {
        font-size: 0.62rem;
        min-width: 38px;
    }
    .s-text {
        font-size: 0.68rem;
    }
    .splash-btn {
        padding: 0.75rem 2rem;
    }
    .splash-btn-text {
        font-size: 0.78rem;
    }
}

:root {
    --bg: #050508;
    --bg-alt: #0a0a10;
    --surface: rgba(15, 15, 25, 0.8);
    --surface-hover: rgba(25, 25, 40, 0.9);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --accent: #fbbf24;
    --accent-glow: rgba(251, 191, 36, 0.08);
    --accent-2: #f59e0b;
    --green: #34d399;
    --green-glow: rgba(52, 211, 153, 0.2);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --font-thai: 'Noto Sans Thai', sans-serif;
    --font-display: 'Outfit', var(--font-thai);
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

/* Dark scrollbar to match theme */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

body {
    font-family: var(--font-thai);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.font-mono { font-family: var(--font-mono); }
.text-xs { font-size: 0.75rem; }

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

strong {
    color: #fff;
    font-weight: 600;
}

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

/* ==========================================
   Dot Grid Background
   ========================================== */
.dot-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* ==========================================
   Cursor Glow Effect
   ========================================== */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 10000; /* Set above splash screen so mouse light shows on cover too */
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ==========================================
   Portfolio Particles
   ========================================== */
.portfolio-particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1; /* Sits above background/dot-grid, below content/nav */
}

.portfolio-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(251, 191, 36, 0.25);
    border-radius: 50%;
    animation: portfolioParticleFloat linear infinite;
}

@keyframes portfolioParticleFloat {
    0% {
        transform: translateY(105vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-5vh) scale(1);
        opacity: 0;
    }
}

/* ==========================================
   Navigation
   ========================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(5, 5, 8, 0.8);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.nav.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-logo-img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-bracket {
    color: var(--accent);
}

.logo-text {
    color: #fff;
    margin: 0 2px;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    font-family: var(--font-thai);
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    flex-direction: column;
    gap: 0.5rem;
    transform: translateY(-10px);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.mobile-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .mobile-menu { display: flex; }
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: calc(var(--nav-height) + 2rem);
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--green-glow);
    border: 1px solid rgba(52, 211, 153, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    color: var(--green);
    margin-bottom: 2rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-title {
    margin-bottom: 1rem;
}

.hero-greeting {
    display: block;
    font-family: var(--font-thai);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.hero-name {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, var(--accent-2) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-role {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    min-height: 1.7em;
}

.cursor-blink {
    animation: cursorBlink 1s step-end infinite;
    color: var(--accent);
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-thai);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    background: #d97706;
    box-shadow: 0 0 30px rgba(217, 119, 6, 0.3);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: #fff;
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

/* Hero Terminal */
.hero-terminal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 640px;
    width: 100%;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.25rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.8;
}

.terminal-line {
    display: flex;
    gap: 0.5rem;
}

.terminal-prompt {
    color: var(--green);
    user-select: none;
}

.terminal-cmd {
    color: #fff;
}

.terminal-output {
    color: var(--text-secondary);
    padding-left: 1.1rem;
    margin-bottom: 0.3rem;
}

/* Scramble/Glitch effect for Terminal Role */
#terminal-role-word {
    display: inline-block;
    transition: color 0.3s ease;
}

#terminal-role-word.scrambling {
    color: var(--green);
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.6), 
                 0 0 15px rgba(52, 211, 153, 0.4);
    font-weight: 500;
}

#terminal-role-word.resolved {
    color: var(--text);
    animation: resolveGlow 1s ease-out;
}

@keyframes resolveGlow {
    0% {
        text-shadow: 0 0 12px var(--accent);
        color: #fff;
    }
    100% {
        text-shadow: none;
        color: var(--text);
    }
}




/* ==========================================
   Sections (General)
   ========================================== */
.section {
    position: relative;
    z-index: 2;
    padding: 6rem 2rem;
}

.section-alt {
    background: var(--bg-alt);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

/* ==========================================
   About Section
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 2.5rem;
    align-items: start;
}

.about-image-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    transition: var(--transition);
}

.about-image-wrapper:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px var(--accent-glow);
    transform: translateY(-4px);
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
    filter: grayscale(15%) contrast(102%);
    transition: var(--transition);
}

.about-image-wrapper:hover .about-img {
    filter: none;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

/* System Status Dashboard */
.about-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
}

.dash-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.dash-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.dash-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dash-dot.green {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: blink 2s infinite;
}

.dash-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 700;
}

.dash-body {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.dash-line {
    margin-bottom: 0.25rem;
}

.dash-label {
    color: var(--accent);
    font-weight: 500;
    margin-right: 0.25rem;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-image-wrapper {
        max-width: 260px;
        margin: 0 auto 1.5rem;
    }
}

/* ==========================================
   Education Section
   ========================================== */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.edu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.edu-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.edu-icon-box {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent);
}

.edu-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.edu-school {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.edu-degree {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
}

.edu-major {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.edu-years {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ==========================================
   Skills Section
   ========================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.skill-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.skill-group:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.skill-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    width: 20px;
    height: 20px;
}

.skill-group-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.skill-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skill-tag-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    transition: var(--transition);
    user-select: none;
}

.skill-tag-pill:hover {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

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

/* ==========================================
   Certificates Section
   ========================================== */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.cert-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.cert-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cert-icon-box {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-sm);
    color: var(--accent);
}

.cert-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cert-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.cert-issuer {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
}

.cert-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.cert-link {
    font-size: 0.72rem;
    color: var(--accent);
    margin-top: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
    align-self: flex-start;
}

.cert-link:hover {
    color: #fff;
}

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

/* ==========================================
   Projects Section
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.project-card-image-wrapper {
    height: 140px;
    background: #f3f4f6;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-card-header-bg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #0f172a;
}

.project-card-github-logo {
    width: 44px;
    height: 44px;
}

.project-card-github-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.project-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.project-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.project-card-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.12);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-xs);
}

.project-card-footer {
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: auto;
}

.project-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

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

/* ==========================================
   Contact Section
   ========================================== */
#contact.section {
    padding-bottom: 3.5rem;
}

.contact-content {
    text-align: center;
}

.contact-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1040px;
    margin: 0 auto;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.contact-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-color: var(--accent);
}

.contact-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
    color: var(--accent);
}

.contact-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.contact-card-value {
    font-size: 0.75rem;
    color: var(--text);
    white-space: nowrap;
}

@media (max-width: 992px) {
    .contact-cards {
        grid-template-columns: repeat(2, 1fr);
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .contact-cards {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-line {
    height: 1px;
    background: var(--border);
    margin-bottom: 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ==========================================
   Animations
   ========================================== */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: animateIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes animateIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
