/* ============================================
   Pure Minimal — Swiss-inspired
   ============================================ */
:root {
    --bg: #fdfdfc;
    --text: #111;
    --muted: #888;
    --faint: #e8e8e6;
    --accent: #111;
    --serif: 'Newsreader', Georgia, serif;
    --mono: 'IBM Plex Mono', monospace;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --pad: clamp(20px, 5vw, 80px);
}

[data-theme="dark"] {
    --bg: #111;
    --text: #e8e8e6;
    --muted: #777;
    --faint: #222;
    --accent: #e8e8e6;
}

[data-theme="light"] {
    --bg: #fdfdfc;
    --text: #111;
    --muted: #888;
    --faint: #e8e8e6;
    --accent: #111;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--sans);
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s, color 0.4s;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--text); color: var(--bg); }
.muted { color: var(--muted); }
.dot { color: var(--muted); }

.inline-link {
    border-bottom: 1px solid var(--muted);
    padding-bottom: 1px;
    transition: border-color 0.2s, color 0.2s;
}

.inline-link:hover {
    color: var(--text);
    border-color: var(--text);
}

/* ============================================
   Nav
   ============================================ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px var(--pad);
    border-bottom: 1px solid var(--faint);
    transition: background 0.4s, border-color 0.4s;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-clock {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.03em;
    transition: color 0.4s;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--faint);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: border-color 0.3s, transform 0.4s var(--ease);
}

.theme-toggle:hover {
    border-color: var(--text);
    transform: rotate(30deg);
}

.icon-moon { display: none; }

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.nav-name {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.8rem;
    color: var(--muted);
    transition: color 0.2s;
}

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

.nav-btn {
    display: none;
    background: none;
    border: none;
    font-family: var(--mono);
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--faint);
    position: sticky;
    top: 61px;
    z-index: 99;
}

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

.mobile-nav a {
    padding: 16px var(--pad);
    font-size: 0.85rem;
    color: var(--muted);
    border-top: 1px solid var(--faint);
    transition: color 0.2s;
}

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

/* ============================================
   Hero
   ============================================ */
.hero {
    padding: clamp(40px, 5vw, 80px) var(--pad) clamp(60px, 10vw, 120px);
    max-width: 1400px;
    display: flex;
    gap: clamp(40px, 6vw, 100px);
    align-items: center;
    justify-content: space-between;
}

.hero-left {
    flex: 1;
    min-width: 0;
    max-width: 580px;
}

.hero-right {
    flex-shrink: 0;
    width: clamp(360px, 40vw, 500px);
}

.hero-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 28px;
}

.hero-h1 {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
}

.hero-h1 span { display: block; }

.terminal {
    background: #1c1c1c;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.4s, border-color 0.4s;
}

.terminal-body,
.typed-text,
.typed-output {
    color: #ccc;
}

.prompt {
    color: #666;
}

.terminal-dots {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid #2a2a2a;
}


.terminal-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.terminal-dots i:nth-child(1) { background: #ff5f57; }
.terminal-dots i:nth-child(2) { background: #febc2e; }
.terminal-dots i:nth-child(3) { background: #28c840; }

.terminal-body {
    padding: 16px 18px;
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.7;
    min-height: 220px;
}

.typed-line {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.prompt {
    color: var(--muted);
    user-select: none;
}

.typed-text {
    color: var(--text);
}

.cursor-blink {
    color: #666;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typed-output {
    font-family: var(--mono);
    font-size: 0.75rem;
    line-height: 1.7;
    color: var(--muted);
    margin: 0;
    white-space: pre;
    min-height: 1.7em;
}

.hero-meta {
    max-width: 560px;
    margin-bottom: 28px;
}

.hero-meta p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.hero-links a {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    padding-bottom: 1px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

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

/* ============================================
   Dividers
   ============================================ */
.divider {
    border: none;
    border-top: 1px solid var(--faint);
    margin: 0 var(--pad);
    transition: border-color 0.4s;
}

.mobile-nav, .footer, .tags span, .project-row, .article-row, .skills-section, .exp {
    transition: border-color 0.4s, background 0.4s;
}

/* ============================================
   Section Grid (label | content)
   ============================================ */
section {
    padding: clamp(48px, 8vw, 80px) var(--pad);
}

.section-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 40px;
    max-width: 960px;
}

.section-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding-top: 3px;
}

/* ============================================
   Venture Card
   ============================================ */
.venture-card {
    border: 1px solid var(--faint);
    border-radius: 8px;
    padding: 32px;
    transition: border-color 0.3s, background 0.4s;
}

.venture-card:hover {
    border-color: var(--text);
}

.venture-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.venture-header h3 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
}

.venture-badge {
    font-family: var(--mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border: 1px solid var(--faint);
    border-radius: 3px;
    color: var(--muted);
}

.venture-tagline {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 500px;
}

.venture-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.venture-service {
    padding: 16px;
    border: 1px solid var(--faint);
    border-radius: 6px;
    transition: border-color 0.2s, transform 0.3s var(--ease);
}

.venture-service:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

.venture-service h4 {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text);
}

.venture-service p {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
}

.venture-stack {
    margin-bottom: 24px;
}

.venture-link {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    border-bottom: 1px solid var(--faint);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.venture-link:hover {
    color: var(--text);
    border-color: var(--text);
}

@media (max-width: 700px) {
    .venture-services {
        grid-template-columns: 1fr;
    }

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

/* ============================================
   Experience
   ============================================ */
.exp {
    margin-bottom: 40px;
}

.exp:last-of-type { margin-bottom: 32px; }

.exp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.exp-head h3 {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 400;
}

.exp-date {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
}

.exp-role {
    font-size: 0.88rem;
    padding: 5px 0;
}

.exp-desc {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 8px;
    margin-bottom: 12px;
    line-height: 1.65;
    max-width: 560px;
}

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

.tags span {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 3px 10px;
    border: 1px solid var(--faint);
    border-radius: 3px;
    color: var(--muted);
    transition: border-color 0.2s, color 0.2s;
}

.tags span:hover {
    border-color: var(--text);
    color: var(--text);
}

.skills-section {
    padding-top: 24px;
    border-top: 1px solid var(--faint);
}

.skills-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text);
    margin-bottom: 20px;
    font-weight: 500;
}

.tags-group {
    margin-bottom: 16px;
}

.tags-group:last-child { margin-bottom: 0; }

.tags-heading {
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 8px;
}

/* ============================================
   Projects
   ============================================ */
.project-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 0;
    border-top: 1px solid var(--faint);
    transition: padding-left 0.4s var(--ease);
}

.project-row:last-of-type {
    border-bottom: 1px solid var(--faint);
}

.project-row:hover {
    padding-left: 12px;
}

.project-info h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 4px;
}

.project-info p {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
    max-width: 460px;
}

.arrow {
    font-size: 1.1rem;
    color: var(--muted);
    transition: transform 0.3s var(--ease), color 0.3s;
    flex-shrink: 0;
    padding-top: 4px;
}

.project-row:hover .arrow {
    transform: translate(3px, -3px);
    color: var(--text);
}

.more-link {
    margin-top: 24px;
}

.more-link a {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    border-bottom: 1px solid var(--faint);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.more-link a:hover {
    color: var(--text);
    border-color: var(--text);
}

/* ============================================
   Articles
   ============================================ */
.article-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 18px 0;
    border-top: 1px solid var(--faint);
    gap: 24px;
    transition: padding-left 0.4s var(--ease);
}

.article-row:last-of-type {
    border-bottom: 1px solid var(--faint);
}

.article-row:hover {
    padding-left: 12px;
}

.article-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.2s;
    flex: 1;
}

.article-row:hover .article-title {
    color: var(--muted);
}

.article-meta {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================
   Contact
   ============================================ */
.contact-block {
    margin-bottom: 32px;
}

.contact-email {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    border-bottom: 1px solid var(--faint);
    padding-bottom: 4px;
    transition: border-color 0.3s;
}

.contact-email:hover {
    border-color: var(--text);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 8px 32px;
}

.contact-grid a {
    font-size: 0.85rem;
    color: var(--muted);
    transition: color 0.2s;
}

.contact-grid a:hover { color: var(--text); }

/* ============================================
   Footer
   ============================================ */
.footer {
    display: flex;
    justify-content: space-between;
    padding: 20px var(--pad);
    border-top: 1px solid var(--faint);
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
}

/* ============================================
   Animations
   ============================================ */
.anim {
    opacity: 0;
    transform: translateY(16px);
    animation: up 0.7s var(--ease) forwards;
}

.anim:nth-child(2) { animation-delay: 0.08s; }
.anim:nth-child(3) { animation-delay: 0.16s; }

.anim-d {
    opacity: 0;
    transform: translateY(12px);
    animation: up 0.6s var(--ease) 0.3s forwards;
}

.anim-d2 {
    opacity: 0;
    transform: translateY(12px);
    animation: up 0.6s var(--ease) 0.45s forwards;
}

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

.anim-s {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.anim-s.show {
    opacity: 1;
    transform: translateY(0);
}

/* Tag stagger */
.tags-group.animated span {
    opacity: 0;
    transform: translateY(8px);
    animation: tagIn 0.4s var(--ease) forwards;
}

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

/* Hover micro-interactions */
.exp {
    transition: transform 0.3s var(--ease);
}

.exp:hover {
    transform: translateX(4px);
}

.tags span {
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

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

.hero-links a {
    position: relative;
    overflow: hidden;
}

.hero-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease);
}

.hero-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Terminal subtle float — applied after initial fade-in */
.hero-right .terminal {
    animation: termFloat 4s ease-in-out 1.2s infinite;
}

@keyframes termFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
    }

    .hero-right {
        width: 100%;
    }

    .hero-right .terminal {
        animation: none;
    }

}

@media (max-width: 700px) {
    .nav-links { display: none; }
    .nav-btn { display: block; }
    .nav-clock { display: none; }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .exp-head { flex-direction: column; gap: 2px; }

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

    .article-row {
        flex-direction: column;
        gap: 4px;
    }

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