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

:root {
    --bg: #05080f;
    --surface: #0b0f1a;
    --border: rgba(255, 255, 255, 0.08);
    --text: #dde3f0;
    --muted: rgba(221, 227, 240, 0.45);
    --accent: #4d9fff;
    --accent-dim: rgba(77, 159, 255, 0.10);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
}

#stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 56px;
    transition: background .5s, backdrop-filter .5s, border-color .5s;
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(5, 8, 15, 0.8);
    backdrop-filter: blur(16px);
    border-color: var(--border);
}

.logo {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--text);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: blink 2.5s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }
}

/* LAYOUT */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 56px;
}

/* HERO */
#hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-inner {
    padding-top: 80px;
}

.hero-tag {
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.06em;
    margin-bottom: 28px;
    opacity: 0;
    animation: up .7s ease .2s forwards;
}

.hero-name {
    font-size: clamp(52px, 8vw, 108px);
    font-weight: 300;
    line-height: 1.0;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    opacity: 0;
    animation: up .9s ease .35s forwards;
}

.hero-name strong {
    font-weight: 500;
}

.hero-sub {
    font-size: clamp(15px, 1.8vw, 19px);
    color: var(--muted);
    max-width: 460px;
    line-height: 1.75;
    margin-bottom: 48px;
    opacity: 0;
    animation: up .7s ease .55s forwards;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    opacity: 0;
    animation: up .7s ease .7s forwards;
}

.btn {
    display: inline-block;
    padding: 13px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .25s ease;
}

.btn-primary {
    background: var(--accent);
    color: #05080f;
}

.btn-primary:hover {
    background: #6ab4ff;
}

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

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.22);
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeIn .8s ease 1.2s forwards;
}

.scroll-line {
    width: 40px;
    height: 1px;
    background: var(--border);
    overflow: hidden;
    position: relative;
}

.scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: translateX(-100%);
    animation: slide 2s ease-in-out 1.5s infinite;
}

@keyframes slide {
    0% {
        transform: translateX(-100%)
    }

    100% {
        transform: translateX(100%)
    }
}

@keyframes up {
    from {
        opacity: 0;
        transform: translateY(24px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    to {
        opacity: 1
    }
}

/* SECTIONS */
section {
    position: relative;
    z-index: 1;
    padding: 120px 0;
    border-top: 1px solid var(--border);
}

#hero {
    border-top: none;
}

.section-label {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 48px;
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-text h2 {
    font-size: clamp(30px, 4vw, 50px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 28px;
}

.about-text h2 strong {
    font-weight: 500;
}

.about-p {
    font-size: 15px;
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 18px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin-top: 48px;
}

.stat {
    background: var(--bg);
    padding: 22px;
}

.stat-n {
    font-size: 34px;
    font-weight: 400;
    color: var(--accent);
    display: block;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-l {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-top: 5px;
    display: block;
}

/* Photo */
.photo-wrap {
    position: relative;
}

.photo-frame {
    aspect-ratio: 4/5;
    background: var(--surface);
    overflow: hidden;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(.15);
    transition: filter .5s;
}

.photo-frame:hover img {
    filter: grayscale(0);
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: .08em;
}

.photo-corner {
    position: absolute;
    bottom: -14px;
    right: -14px;
    width: 70px;
    height: 70px;
    border: 1px solid var(--border);
    z-index: -1;
}

.photo-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--accent);
}

/* PROJECTS */
.projects-list {
    display: flex;
    flex-direction: column;
}

.project-row {
    display: grid;
    grid-template-columns: 260px 1fr 80px;
    gap: 40px;
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    transition: all .25s;
}

.project-row::before {
    content: '';
    position: absolute;
    inset: 0 -56px;
    background: var(--accent-dim);
    opacity: 0;
    transition: opacity .25s;
}

.project-row:hover::before {
    opacity: 1;
}

.project-thumb {
    aspect-ratio: 16/10;
    background: var(--surface);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.project-thumb-bg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: transform .5s ease;
}

.project-row:hover .project-thumb-bg {
    transform: scale(1.06);
}

.project-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.project-row:hover .project-thumb img {
    transform: scale(1.06);
}

.project-info {
    position: relative;
    z-index: 1;
}

.project-name {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.project-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 400px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag {
    font-size: 11px;
    color: var(--accent);
    border: 1px solid rgba(77, 159, 255, 0.2);
    padding: 3px 9px;
    background: rgba(77, 159, 255, 0.05);
}

.project-meta {
    position: relative;
    z-index: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.project-year {
    font-size: 13px;
    color: var(--muted);
}

.project-arrow {
    font-size: 18px;
    color: var(--accent);
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity .25s, transform .25s;
}

.project-row:hover .project-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.skill-cell {
    background: var(--bg);
    padding: 30px;
    transition: background .25s;
}

.skill-cell:hover {
    background: var(--surface);
}

.skill-icon {
    font-size: 22px;
    margin-bottom: 14px;
    display: block;
}

.skill-name {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 8px;
}

.skill-items {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.9;
}

/* EXPERIENCE */
.exp-list {
    display: flex;
    flex-direction: column;
}

.exp-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.exp-period {
    font-size: 13px;
    color: var(--muted);
    display: block;
    margin-bottom: 5px;
}

.exp-company {
    font-size: 13px;
    color: var(--accent);
}

.exp-role {
    font-size: 19px;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.exp-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.8;
    max-width: 560px;
}

/* CONTACT */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-heading {
    font-size: clamp(34px, 4.5vw, 60px);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.contact-heading strong {
    font-weight: 500;
    color: var(--accent);
}

.contact-note {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 36px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 20px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    border: 1px solid var(--border);
    transition: border-color .25s, color .25s;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.contact-link span:last-child {
    font-size: 16px;
    transition: transform .25s;
}

.contact-link:hover span:last-child {
    transform: translate(3px, -3px);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input,
.textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 300;
    padding: 13px 16px;
    outline: none;
    resize: none;
    transition: border-color .25s;
}

.input:focus,
.textarea:focus {
    border-color: var(--accent);
}

.textarea {
    min-height: 110px;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--muted);
}

/* FOOTER */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 28px 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--muted);
}

/* REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.d1 {
    transition-delay: .1s;
}

.d2 {
    transition-delay: .2s;
}

.d3 {
    transition-delay: .3s;
}

/* RESPONSIVE */
@media (max-width: 860px) {
    nav {
        padding: 20px 24px;
    }

    .nav-links,
    .nav-status {
        display: none;
    }

    .container {
        padding: 0 24px;
    }

    section {
        padding: 80px 0;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .project-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .project-meta {
        display: none;
    }

    .exp-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 24px;
    }

    .scroll-hint {
        display: none;
    }
}