/* Global styles */
:root {
    color-scheme: light;
    color: #1f2937;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 30%), linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: #0f172a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header,
.site-footer {
    background: #0f172a;
    color: #f8fafc;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.header-inner,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.logo {
    font-weight: 700;
    letter-spacing: -0.04em;
}

.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: #f8fafc;
    padding: 0.4rem 0.6rem;
    border-radius: 0.65rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    background: rgba(248, 250, 252, 0.12);
    color: #ffffff;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid #f8fafc;
    color: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
}

.hero {
    position: relative;
    padding: 5rem 0 3rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.18), transparent 24%), radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.12), transparent 22%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    display: grid;
    gap: 1.25rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    opacity: 0.85;
    letter-spacing: 0.22em;
}

.hero h1 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin: 0;
}

.hero p {
    max-width: 680px;
    margin: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.button,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.4rem;
    border-radius: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.link-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
}

.primary {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    color: #0f172a;
}

.secondary {
    background: rgba(248, 250, 252, 0.12);
    color: #f8fafc;
    border: 1px solid rgba(248, 250, 252, 0.18);
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: #e2e8f0;
}

.section h2,
.section h1 {
    margin-top: 0;
}

.section h2 {
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.45rem;
    width: 3rem;
    height: 0.35rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.skills-grid,
.contact-grid,
.project-grid {
    display: grid;
    gap: 1rem;
}

.skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.skills-grid span,
.contact-card,
.project-card,
.project-detail {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.skills-grid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    background: #f8fafc;
    border: 1px solid transparent;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.skills-grid span:hover,
.skills-grid span:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    border-color: #a5b4fc;
    background: #ffffff;
    cursor: default;
}

.project-card:hover,
.project-detail:hover,
.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    border-color: #a5b4fc;
}

.project-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.certification-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.certification-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.certification-card:hover {
    transform: translateY(-3px);
    border-color: #a5b4fc;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.certification-label {
    margin: 0 0 0.5rem;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.certification-card h2 {
    margin-bottom: 1rem;
}

.certification-details {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.certification-details div {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
}

.certification-details dt {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.certification-details dd {
    margin: 0.15rem 0 0;
}

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

.project-details h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #0f172a;
}

.project-details ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.project-details li {
    margin-bottom: 0.5rem;
}

.project-details strong {
    font-weight: 600;
}

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

.contact-card h2 {
    margin-top: 0;
}

.site-footer {
    padding: 1.5rem 0;
}

.site-footer a {
    color: #f8fafc;
}

.site-footer a:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .main-nav.open {
        display: flex;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .section {
        padding: 3rem 0;
    }
}
