/* ============================================
   Portfolio — Dark Minimal
   Fonts: Syne (display) + IBM Plex Mono (body)
   ============================================ */

:root {
    --bg:        #0a0a0a;
    --bg-raised: #111111;
    --bg-card:   #161616;
    --border:    #222222;
    --text:      #e0ddd5;
    --text-dim:  #7a7770;
    --accent:    #c8a45a;
    --accent-dim:#a8884a;
    --white:     #f5f2eb;
    --radius:    6px;
    --max-w:     1100px;
    --nav-h:     64px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    line-height: 1.15;
    color: var(--white);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--white); }

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

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 4vw, 48px);
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}

.nav--scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
}

.nav__logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--white);
    letter-spacing: -0.5px;
}
.nav__logo:hover { color: var(--accent); }

.nav__links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav__link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    position: relative;
    padding: 4px 0;
}
.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav__link:hover,
.nav__link--active {
    color: var(--white);
}
.nav__link:hover::after,
.nav__link--active::after {
    width: 100%;
}

/* Mobile toggle */
.nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
    z-index: 110;
}
.nav__toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--white);
    position: absolute;
    left: 0;
    transition: transform 0.3s, opacity 0.3s;
}
.nav__toggle span:first-child { top: 4px; }
.nav__toggle span:last-child { bottom: 4px; }

.nav__toggle--open span:first-child {
    transform: translateY(5.5px) rotate(45deg);
}
.nav__toggle--open span:last-child {
    transform: translateY(-5.5px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav__toggle { display: block; }
    .nav__links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 260px;
        background: var(--bg-raised);
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: 40px;
        transform: translateX(100%);
        transition: transform 0.35s ease;
        border-left: 1px solid var(--border);
    }
    .nav__links--open { transform: translateX(0); }
    .nav__link { font-size: 14px; }
}

/* ---- Main ---- */
.main {
    min-height: calc(100vh - var(--nav-h));
    padding-top: var(--nav-h);
}

/* ---- Section Layout ---- */
.section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 80px clamp(20px, 4vw, 48px);
}

.section__label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section__title {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.section__subtitle {
    color: var(--text-dim);
    font-size: 14px;
    max-width: 520px;
    margin-bottom: 48px;
}

/* ---- Hero (Index) ---- */
.hero {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(100px, 18vh, 200px) clamp(20px, 4vw, 48px) 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero__greeting {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 1px;
}

.hero__name {
    font-size: clamp(40px, 7vw, 80px);
    letter-spacing: -2px;
    line-height: 1.05;
}

.hero__name span {
    display: block;
    color: var(--text-dim);
    font-weight: 500;
}

.hero__bio {
    max-width: 480px;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.8;
}

.hero__links {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.hero__link {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent);
    padding-bottom: 2px;
    border-bottom: 1px solid var(--accent-dim);
}
.hero__link:hover {
    color: var(--white);
    border-color: var(--white);
}

/* ---- Cards (Work / Education) ---- */
.cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color 0.3s, transform 0.2s;
}
.card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.card__title {
    font-size: 20px;
    font-weight: 700;
}

.card__date {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
}

.card__role {
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.card__desc {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.7;
}

/* ---- Hobby Grid ---- */
.hobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.hobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.2s;
}
.hobby-card:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
}

.hobby-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: grayscale(30%) brightness(0.85);
    transition: filter 0.4s;
}
.hobby-card:hover .hobby-card__img {
    filter: grayscale(0%) brightness(1);
}

.hobby-card__body {
    padding: 20px 24px 24px;
}

.hobby-card__title {
    font-size: 18px;
    margin-bottom: 8px;
}

.hobby-card__desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ---- Travel / Map ---- */
.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 40px;
}

.map-wrap #map {
    height: 450px;
    width: 100%;
}

/* Dark Leaflet tiles override */
.leaflet-tile-pane { filter: brightness(0.7) contrast(1.1) saturate(0.3); }
.leaflet-control-attribution { opacity: 0.4; font-size: 10px !important; }
.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--white) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}
.leaflet-popup-tip { background: var(--bg-card) !important; }

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.location-tag {
    font-size: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dim);
    transition: border-color 0.2s, color 0.2s;
}
.location-tag:hover {
    border-color: var(--accent-dim);
    color: var(--white);
}

/* ---- Timeline ---- */
.timeline-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 40px;
}

.timeline-form__title {
    font-size: 16px;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 520px) {
    .form-row { flex-direction: column; }
}

.form-input,
.form-textarea {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-dim);
}
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-dim);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 28px;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}
.form-btn:hover {
    background: var(--white);
}

.posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.post__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 4px;
}

.post__name {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
}

.post__email {
    font-size: 11px;
    color: var(--text-dim);
}

.post__content {
    font-size: 13px;
    color: var(--text);
    line-height: 1.7;
}

.post__empty {
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    padding: 40px 0;
}

/* ---- About ---- */
.about-content {
    max-width: 600px;
}

.about-content p {
    color: var(--text-dim);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.8;
}

/* ---- Footer ---- */
.footer {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px) 40px;
}

.footer__line {
    display: block;
    height: 1px;
    background: var(--border);
    margin-bottom: 20px;
}

.footer__text {
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* ---- Stagger delays for reveal children ---- */
.stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger > .reveal:nth-child(5) { transition-delay: 0.32s; }
.stagger > .reveal:nth-child(6) { transition-delay: 0.40s; }
