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

:root {
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-light: #eff6ff;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 10px -5px rgba(0,0,0,0.05);
    --radius: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== LAYOUT ===== */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 28px;
}

.section { padding: 100px 0; }
.section.alt { background: var(--bg-alt); }

/* ===== SECTION HEADERS ===== */
.section-header { margin-bottom: 56px; }

.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
}

/* ===== NAVIGATION ===== */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.nav-inner {
    display: flex;
    align-items: center;
    height: 72px;
    gap: 36px;
}

.logo {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--accent);
    background: var(--accent-light);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.logo:hover { background: #dbeafe; }

.nav-links {
    display: flex;
    gap: 28px;
    margin-left: auto;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.2s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--accent); }

.btn-nav {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 8px 18px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-nav:hover {
    background: var(--accent);
    color: white;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    display: none;
    padding: 16px 28px 24px;
    border-top: 1px solid var(--border);
    background: white;
}

.mobile-menu.open { display: block; }

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-menu a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    transition: color 0.2s;
}

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

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: white;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: 10px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(37,99,235,0.25);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37,99,235,0.25);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-lg {
    font-size: 16px;
    padding: 15px 36px;
}

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 96px;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37,99,235,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,0.05) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: radial-gradient(ellipse 80% 80% at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at center, black 30%, transparent 75%);
    pointer-events: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-greeting {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.hero-name {
    font-size: clamp(44px, 7vw, 76px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
    margin-bottom: 14px;
}

.hero-role {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.hero-desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 420px;
    line-height: 1.75;
    margin-bottom: 36px;
}

.hero-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-socials { display: flex; gap: 12px; }

.hero-socials a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}

.hero-socials a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
}

.scroll-down {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2.4s ease-in-out infinite;
}

.scroll-down a {
    color: var(--text-muted);
    display: flex;
    transition: color 0.2s;
}

.scroll-down a:hover { color: var(--accent); }

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== TERMINAL ===== */
.hero-terminal-wrap { perspective: 1000px; }

.terminal {
    background: #16213e;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255,255,255,0.06),
        inset 0 1px 0 rgba(255,255,255,0.05);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1;
}

.terminal-header {
    background: #1e2d4a;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

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

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin: 0 auto;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.terminal-body {
    padding: 22px 22px 28px;
}

.t-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: rgba(255,255,255,0.82);
    line-height: 1.5;
    min-height: 20px;
}

.t-gap { margin-top: 14px; }

.t-prompt {
    color: #28c840;
    flex-shrink: 0;
    font-weight: 500;
    user-select: none;
}

.t-cmd { color: #7dd3fc; }

.t-out {
    color: rgba(255,255,255,0.55);
    padding-left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.t-green { color: #28c840; font-size: 10px; }

.t-cursor {
    color: #7dd3fc;
    animation: blink 1.1s step-end infinite;
    font-size: 14px;
}

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

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 72px;
    align-items: start;
}

.about-text p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.85;
}

.about-text p:last-child { margin-bottom: 0; }

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-num {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
}

/* ===== SKILLS ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-group {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.skill-group:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.skill-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.skill-icon { font-size: 15px; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 100px;
    line-height: 1.4;
    transition: background 0.15s, color 0.15s;
}

.tag.accent {
    background: var(--accent-light);
    color: var(--accent);
    border-color: rgba(37,99,235,0.2);
    font-weight: 600;
}

/* ===== EXPERIENCE TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 36px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px; top: 12px; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--border));
    border-radius: 2px;
}

.timeline-item { position: relative; }

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2.5px solid white;
    box-shadow: 0 0 0 2px var(--accent);
}

.exp-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
}

.exp-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.exp-period {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    background: var(--accent-light);
    padding: 3px 10px;
    border-radius: 100px;
}

.exp-dot { color: var(--text-muted); font-size: 18px; line-height: 1; }

.exp-location {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.exp-role {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 4px;
}

.exp-company {
    font-size: 15px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 24px;
}

.exp-bullets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exp-bullets li {
    font-size: 15px;
    color: var(--text-secondary);
    padding-left: 22px;
    position: relative;
    line-height: 1.65;
}

.exp-bullets li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 12px;
    top: 3px;
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.project-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.project-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 8px;
}

.project-badge.aws   { background: #fff8e6; color: #b45309; }
.project-badge.azure { background: #eff6ff; color: #1d4ed8; }
.project-badge.gcp   { background: #fef2f2; color: #b91c1c; }

.project-link {
    color: var(--text-muted);
    transition: color 0.2s, transform 0.15s;
    display: flex;
}

.project-link:hover {
    color: var(--text);
    transform: translateY(-2px);
}

.project-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.75;
    flex: 1;
    margin-bottom: 22px;
}

.project-tags { margin-top: auto; }

/* ===== EDUCATION ===== */
.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.edu-card {
    display: flex;
    align-items: center;
    gap: 22px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.edu-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.edu-badge {
    width: 54px;
    height: 54px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

.edu-degree {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.edu-level {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== CONTACT ===== */
.contact-inner {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-inner .section-label { margin-bottom: 10px; }

.contact-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
    margin-top: 4px;
    line-height: 1.1;
}

.contact-desc {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.75;
}

.contact-links {
    display: flex;
    gap: 28px;
    margin-top: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

/* ===== FOOTER ===== */
.footer {
    background: var(--text);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copy {
    font-size: 14px;
    color: rgba(255,255,255,0.35);
}

.footer-links { display: flex; gap: 22px; }

.footer-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.35);
    transition: color 0.2s;
}

.footer-links a:hover { color: rgba(255,255,255,0.75); }

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .skills-grid   { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid    { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
    .nav-links, .btn-nav { display: none; }
    .hamburger { display: flex; }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 52px;
        text-align: center;
    }

    .hero-desc   { margin-left: auto; margin-right: auto; }
    .hero-btns   { justify-content: center; }
    .hero-socials { justify-content: center; }

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

    .section { padding: 72px 0; }

    .exp-card { padding: 24px; }
}

@media (max-width: 520px) {
    .about-stats { grid-template-columns: 1fr; }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .hero-btns .btn-primary,
    .hero-btns .btn-ghost {
        width: 100%;
        justify-content: center;
    }
}
