/* ========================================
   Hessbyte - Personal Portfolio
   Static, privacy-minimal design
   ======================================== */

:root {
    --bg-primary: #050B14;
    --bg-section: #07111F;
    --bg-card: #0E1726;
    --bg-card-hover: #121E2E;
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --accent-teal: #00CFFF;
    --accent-blue: #2563EB;
    --accent-warm: #00CFFF;
    --brand-mark-text: #050B14;
    --border-soft: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(34, 211, 238, 0.18);
    --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.26);
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    min-width: 320px;
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-secondary);
    background:
        linear-gradient(180deg, rgba(5, 11, 20, 0.94), rgba(5, 11, 20, 1)),
        var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

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

.container {
    width: min(100% - 48px, 1160px);
    margin: 0 auto;
}

.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    padding: 0 24px;
    background: rgba(5, 11, 20, 0.72);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background var(--transition), border-color var(--transition);
}

.nav.scrolled {
    background: rgba(5, 11, 20, 0.94);
    border-bottom-color: var(--border-soft);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, 1160px);
    height: 72px;
    margin: 0 auto;
}

.nav-brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-weight: 700;
}

.nav-brand-mark,
.footer-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    color: var(--brand-mark-text);
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    font-size: 13px;
    font-weight: 800;
}

.nav-brand-name {
    font-size: 15px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active-link {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.055);
}

.nav-links .nav-cta {
    color: var(--accent-teal);
    border: 1px solid var(--border-accent);
    background: rgba(32, 214, 199, 0.08);
}

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

.nav-toggle span {
    width: 23px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:first-child {
    transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--bg-primary);
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    box-shadow: 0 14px 34px rgba(0, 207, 255, 0.22);
}

.btn-secondary {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.045);
    border-color: var(--border-soft);
}

.btn-secondary:hover {
    border-color: var(--border-accent);
    background: rgba(32, 214, 199, 0.08);
}

.btn-sm {
    min-height: 38px;
    padding: 8px 18px;
    font-size: 13px;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 126px 0 74px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, black 0%, transparent 78%);
    -webkit-mask-image: linear-gradient(180deg, black 0%, transparent 78%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 64px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px;
    margin-bottom: 24px;
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    color: var(--accent-teal);
    background: rgba(32, 214, 199, 0.08);
    font-size: 13px;
    font-weight: 700;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent-warm);
}

.hero-title {
    max-width: 760px;
    margin-bottom: 18px;
    color: var(--text-primary);
    font-size: clamp(40px, 5.8vw, 68px);
    font-weight: 800;
    line-height: 1.05;
}

.hero-subtitle {
    margin-bottom: 18px;
    color: var(--accent-warm);
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 700;
}

.hero-description {
    max-width: 610px;
    margin-bottom: 22px;
    color: var(--text-secondary);
    font-size: 17px;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 34px;
    color: var(--accent-teal);
    font-size: 14px;
    font-weight: 700;
}

.separator {
    color: var(--text-muted);
    opacity: 0.55;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-visual {
    position: relative;
}

.portrait-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-soft);
}

.portrait-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: inherit;
    pointer-events: none;
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 16%;
}

.hero-note {
    position: absolute;
    right: -22px;
    bottom: 28px;
    width: min(280px, 72%);
    padding: 20px;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    background: rgba(10, 22, 33, 0.9);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
}

.note-label,
.skill-group-title,
.timeline-date,
.legal-kicker {
    font-family: var(--font-mono);
}

.note-label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-warm);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-note p {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.55;
}

.section {
    padding: 96px 0;
}

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

.section-header {
    max-width: 760px;
    margin: 0 auto 54px;
    text-align: center;
}

.section-title {
    margin-bottom: 14px;
    color: var(--text-primary);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.14;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 16px;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 54px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 16px;
}

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

.profile-card {
    position: sticky;
    top: 100px;
    padding: 30px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.profile-photo {
    width: 132px;
    height: 132px;
    margin: 0 auto 18px;
    border: 2px solid rgba(32, 214, 199, 0.32);
    border-radius: 50%;
    object-fit: cover;
    object-position: center 14%;
}

.profile-name {
    margin-bottom: 4px;
    color: var(--text-primary);
    font-size: 21px;
    font-weight: 800;
}

.profile-role {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.profile-divider {
    height: 1px;
    margin: 20px 0;
    background: var(--border-soft);
}

.profile-label {
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-chips,
.skill-chips,
.work-tags,
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-chips {
    justify-content: center;
}

.chip,
.skill-chip,
.work-tags span,
.project-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: normal;
}

.chip {
    padding: 5px 12px;
    color: var(--accent-teal);
    border: 1px solid var(--border-accent);
    background: rgba(32, 214, 199, 0.07);
}

.work-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.work-card,
.project-card,
.interest-card,
.skill-group,
.contact-card,
.timeline-content,
.legal-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.work-card,
.project-card,
.interest-card,
.skill-group,
.contact-card {
    padding: 30px;
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.work-card:hover,
.project-card:hover,
.interest-card:hover,
.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.work-card-icon,
.contact-icon,
.interest-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    color: var(--accent-teal);
    background: rgba(32, 214, 199, 0.08);
}

.work-card h3,
.project-card h3,
.interest-card h3,
.contact-card h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
}

.work-card p,
.project-card p,
.interest-card p {
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 14px;
}

.work-tags span {
    padding: 4px 10px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-soft);
}

.project-tags span {
    padding: 4px 10px;
    color: var(--accent-teal);
    background: rgba(0, 207, 255, 0.06);
    border: 1px solid rgba(0, 207, 255, 0.14);
}

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

.skill-group-title {
    margin-bottom: 18px;
    color: var(--accent-warm);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.skill-chip {
    padding: 5px 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.045);
}

.project-number {
    margin-bottom: 16px;
    color: rgba(0, 207, 255, 0.42);
    font-family: var(--font-mono);
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
}

.timeline {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    padding-left: 42px;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 7px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-teal), rgba(0, 207, 255, 0.28), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    top: 5px;
    left: -46px;
    width: 24px;
    height: 24px;
    border: 3px solid var(--accent-teal);
    border-radius: 50%;
    background: var(--bg-primary);
    box-shadow: 0 0 0 6px rgba(0, 207, 255, 0.08), 0 0 18px rgba(0, 207, 255, 0.3);
}

.timeline-item:first-child .timeline-marker {
    background: var(--accent-teal);
}

.timeline-content {
    padding: 24px 28px;
}

.timeline-date {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--accent-warm);
    font-size: 13px;
    font-weight: 800;
}

.timeline-content h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 800;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 14px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

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

.contact-icon {
    margin-right: auto;
    margin-left: auto;
}

.contact-card p {
    margin-bottom: 18px;
    color: var(--text-muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.legal-hero {
    padding: 132px 0 54px;
    background: var(--bg-section);
}

.legal-wrap {
    max-width: 880px;
}

.legal-card {
    padding: 34px;
    margin-bottom: 24px;
}

.legal-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent-teal);
    font-size: 13px;
    font-weight: 800;
}

.legal-title {
    margin-bottom: 14px;
    color: var(--text-primary);
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
}

.legal-card h2 {
    margin: 28px 0 10px;
    color: var(--text-primary);
    font-size: 22px;
}

.legal-card h2:first-child {
    margin-top: 0;
}

.legal-card h3 {
    margin: 22px 0 8px;
    color: var(--text-primary);
    font-size: 17px;
}

.legal-card p,
.legal-card li {
    color: var(--text-secondary);
    font-size: 15px;
}

.legal-card p {
    margin-bottom: 12px;
}

.legal-card ul {
    margin: 10px 0 14px 22px;
}

.legal-card a {
    color: var(--accent-teal);
    border-bottom: 1px solid rgba(32, 214, 199, 0.35);
}

.legal-meta {
    color: var(--text-muted);
    font-size: 14px;
}

.footer {
    padding: 48px 0 34px;
    border-top: 1px solid var(--border-soft);
    background: #061016;
}

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

.footer-brand {
    margin-bottom: 16px;
}

.footer-mark {
    width: 34px;
    height: 34px;
    font-size: 12px;
}

.footer-name {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
    text-align: left;
}

.footer-role {
    color: var(--text-muted);
    font-size: 12px;
    text-align: left;
}

.footer-tagline {
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-bottom: 22px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

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

.footer-copy {
    color: rgba(145, 163, 180, 0.65);
    font-size: 12px;
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .hero-content,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        width: min(100%, 560px);
    }

    .profile-card {
        position: static;
        max-width: 420px;
        margin: 0 auto;
    }

    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .container {
        width: min(100% - 32px, 1160px);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 20px 24px 24px;
        border-bottom: 1px solid var(--border-soft);
        background: rgba(5, 11, 20, 0.98);
        transform: translateY(-118%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        width: 100%;
        padding: 12px 14px;
    }

    .hero {
        padding: 108px 0 60px;
    }

    .section {
        padding: 68px 0;
    }

    .section-header {
        margin-bottom: 38px;
        text-align: left;
    }

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

    .hero-note {
        position: static;
        width: 100%;
        margin-top: 14px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

@media (max-width: 520px) {
    .nav {
        padding: 0 16px;
    }

    .nav-brand-name {
        display: none;
    }

    .hero-title {
        font-size: 38px;
    }

    .portrait-frame {
        aspect-ratio: 1 / 1.18;
    }

    .work-card,
    .project-card,
    .skill-group,
    .contact-card {
        padding: 24px;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-marker {
        left: -34px;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

::selection {
    color: var(--text-primary);
    background: rgba(32, 214, 199, 0.26);
}
