/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Ops-console palette (no purple hues) */
    --primary-color: #22d3ee;     /* cyan accent */
    --secondary-color: #0ea5e9;   /* cyan/blue supporting accent */
    --text-color: #e5e7eb;
    --text-light: #94a3b8;
    --bg-color: #0b1220;
    --bg-secondary: #0f1a2e;
    --border-color: #233047;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
    --shadow-lg: 0 0 0 1px rgba(34, 211, 238, 0.08), 0 10px 30px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

a {
    color: var(--primary-color);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(34, 211, 238, 0.65);
    outline-offset: 3px;
    border-radius: 10px;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.35;
    z-index: 0;
}

main,
nav,
footer,
section {
    position: relative;
    z-index: 1;
}

main {
    padding-top: 86px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 10px;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 10px 14px;
    border-radius: 10px;
    z-index: 2000;
}

.skip-link:focus {
    left: 10px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 70px 0;
}

.page-header {
    padding: 40px 0 10px;
}

.page-title {
    font-size: 2.4rem;
    letter-spacing: -0.02em;
}

.page-lead {
    color: var(--text-light);
    max-width: 70ch;
    margin-top: 12px;
}

.page-section {
    padding-top: 40px;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.section-link:hover {
    text-decoration: underline;
}

.section-title-left {
    text-align: left;
    margin-bottom: 0;
}

.section-title-left::after {
    margin-left: 0;
}

.section-lead-left {
    text-align: left;
    max-width: 70ch;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-color);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.nav-brand h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.brand-link {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link[aria-current="page"] {
    color: var(--primary-color);
}

.nav-link:focus-visible {
    outline: 3px solid rgba(34, 211, 238, 0.65);
    outline-offset: 6px;
    border-radius: 12px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 62vh;
    display: flex;
    align-items: center;
    background: var(--bg-color);
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.highlight {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.85;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #06121a;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--bg-secondary);
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: rgba(15, 26, 46, 0.75);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.skill-card p {
    color: var(--text-light);
}

/* Impact Section */
.impact {
    background: var(--bg-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(15, 26, 46, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-light);
}

/* Experience */
.experience {
    background: var(--bg-secondary);
}

.experience-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.experience-card {
    background: rgba(15, 26, 46, 0.75);
    border-radius: 15px;
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.experience-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.experience-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.experience-meta {
    color: var(--text-light);
    font-size: 0.95rem;
}

.experience-bullets {
    margin-left: 18px;
    color: var(--text-light);
}

.experience-bullets li {
    margin: 8px 0;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background: rgba(15, 26, 46, 0.75);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.project-image {
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-fallback {
    color: var(--text-color);
    font-weight: 800;
    padding: 0 20px;
    text-align: center;
}

.project-placeholder {
    font-size: 4rem;
    color: var(--text-color);
    opacity: 0.8;
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.project-tags span {
    background: rgba(11, 18, 32, 0.6);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Journal */
.journal-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 900px;
    margin: 0 auto;
}

.journal-card {
    background: rgba(15, 26, 46, 0.75);
    border-radius: 15px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.journal-meta {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.journal-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.journal-title a {
    color: var(--text-color);
    text-decoration: none;
}

.journal-title a:hover {
    color: var(--primary-color);
}

.journal-summary {
    color: var(--text-light);
}

/* Post */
.post {
    padding: 60px 0;
}

.post-header {
    max-width: 75ch;
    margin: 0 auto 24px;
}

.post-kicker {
    color: var(--text-light);
    margin-bottom: 10px;
}

.post-kicker a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.post-kicker a:hover {
    text-decoration: underline;
}

.post-title {
    font-size: 2.4rem;
    letter-spacing: -0.02em;
}

.post-lead {
    color: var(--text-light);
    margin-top: 10px;
}

.post-content {
    max-width: 75ch;
    margin: 0 auto;
    font-size: 1.05rem;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.project-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
}

.project-links a:hover {
    text-decoration: underline;
}

.section-lead {
    max-width: 780px;
    margin: 0 auto 22px;
    text-align: center;
    color: var(--text-light);
}

.subsection-title {
    font-size: 1.4rem;
    margin: 30px 0 16px;
    text-align: left;
}

/* Contact Section */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.1rem;
}

.contact-label {
    min-width: 90px;
    text-align: right;
    color: var(--text-light);
    font-weight: 700;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Footer */
.footer {
    background: rgba(15, 26, 46, 0.9);
    color: var(--text-color);
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-color);
    font-size: 1rem;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .footer .container {
        flex-direction: column;
        gap: 20px;
    }

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

    .contact-label {
        min-width: 70px;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn {
        padding: 12px 30px;
    }
}
