/* ===== Variables ===== */
:root {
    --bg: #030014;
    --bg-alt: #0a0a1a;
    --surface: #12121f;
    --border: #2a2a4a;
    --text: #f1f5f9;
    --text-muted: #8b8ba3;
    --cyan: #06b6d4;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --gradient: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6, #ec4899);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ===== Accessibility ===== */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cyan);
    color: var(--bg);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 16px;
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* Focus styles for keyboard navigation */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
    border-radius: 4px;
}

.btn-primary:focus-visible, .btn-secondary:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== PCB Circuit Background ===== */
#circuit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ===== Header ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: background 0.3s;
}

header.scrolled {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.logo span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 8px;
}

#nav {
    display: flex;
    gap: 36px;
}

#nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

#nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 2px;
    transition: width 0.3s ease, left 0.3s ease;
}

#nav a:hover {
    color: var(--text);
}

#nav a:hover::before {
    width: 100%;
    left: 0;
}

#nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 8px;
    background: radial-gradient(ellipse, rgba(6, 182, 212, 0.4), transparent);
    filter: blur(4px);
    transition: width 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

#nav a:hover::after {
    width: 100%;
    opacity: 1;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lang-btn:hover {
    border-color: var(--cyan);
    color: var(--text);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.lang-btn:hover::before {
    opacity: 1;
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    padding: 0;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

@media (max-width: 768px) {
    .menu-btn { display: flex; }

    #nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 15, 26, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        z-index: 90;
    }

    #nav.open {
        transform: translateY(0);
        opacity: 1;
    }

    #nav a {
        font-size: 1.1rem;
        padding: 16px 20px;
        border-bottom: none;
        border-radius: 8px;
        background: transparent;
        transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
    }

    #nav a::before,
    #nav a::after {
        display: none;
    }

    #nav a:hover {
        background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1));
        transform: translateX(8px);
    }

    #nav a:active {
        transform: translateX(8px) scale(0.98);
    }
}

/* ===== Hero ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    z-index: 1;
}

@media (max-width: 480px) {
    #hero {
        padding: 100px 20px 60px;
    }
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid transparent;
    background-clip: padding-box;
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
    position: relative;
}

.badge::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

#hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 30%, #8b5cf6 60%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

#hero h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-tags {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 40px;
}

.hero-tags span[aria-hidden="true"] {
    color: var(--text-muted);
    margin: 0 12px;
}

@media (max-width: 480px) {
    .hero-tags {
        font-size: 0.85rem;
    }

    .hero-tags span[aria-hidden="true"] {
        margin: 0 8px;
    }
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6);
    background-size: 200% 200%;
    color: white;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    min-height: 44px; /* Better touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-position: 100% 100%;
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 14px 28px;
    border-radius: 8px;
    transition: border-color 0.2s;
    min-height: 44px; /* Better touch target */
}

.btn-secondary:hover {
    border-color: var(--text-muted);
}

/* ===== Sections ===== */
section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    section {
        padding: 48px 0;
    }
}

.alt-bg {
    background: var(--bg-alt);
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .section-head {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .section-head {
        margin-bottom: 32px;
    }
}

.section-head h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 12px;
}

.section-head p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ===== Experience Badge ===== */
.exp-badge {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 50px;
    margin-bottom: 24px;
}

.exp-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.exp-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .card-grid { grid-template-columns: 1fr; }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    position: relative;
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
    }
}

.card-highlight {
    border-color: var(--purple);
    background: linear-gradient(135deg, var(--surface), rgba(139, 92, 246, 0.08));
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--purple);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.card-cat {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 4px;
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    align-items: start;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .about-grid {
        gap: 24px;
    }
}

.about-profile {
    margin-bottom: 24px;
}

.profile-img {
    width: 220px;
    height: 220px;
    min-width: 220px;
    min-height: 220px;
    max-width: 220px;
    max-height: 220px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid var(--border);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.25);
    border-color: var(--cyan);
}

@media (max-width: 768px) {
    .about-profile {
        text-align: center;
    }

    .profile-img {
        width: 180px;
        height: 180px;
        min-width: 180px;
        min-height: 180px;
        max-width: 180px;
        max-height: 180px;
    }
}

.about-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.about-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.info-card h4 {
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.info-card ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-card li {
    font-size: 0.9rem;
    color: var(--text);
    padding-left: 16px;
    position: relative;
}

.info-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .contact-grid {
        gap: 24px;
    }

    .contact-cta {
        padding: 24px;
    }
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.contact-info > p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.contact-links a {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.contact-links a:hover {
    color: var(--accent-hover);
}

.contact-info address {
    font-style: normal;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-cta {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.available {
    display: inline-block;
    color: #22c55e;
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
}

/* ===== Footer ===== */
footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    position: relative;
    z-index: 1;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-inner > span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    #nav a, .lang-btn, .menu-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .contact-links a {
        display: block;
        padding: 8px 0;
        min-height: 44px;
    }
}
