/* ========================================
   Terminal Portfolio - CSS
   ======================================== */

:root {
    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-hover: #1a1a1a;
    --text: #e4e4e7;
    --text-dim: #71717a;
    --accent: #4ade80;
    --accent-dim: #22c55e;
    --border: #27272a;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
}

[data-theme="light"] {
    --bg: #fafafa;
    --bg-card: #ffffff;
    --bg-hover: #f4f4f5;
    --text: #18181b;
    --text-dim: #71717a;
    --accent: #16a34a;
    --accent-dim: #15803d;
    --border: #e4e4e7;
}

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

html {
    font-size: 15px;
}

body {
    font-family: var(--font-mono);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========================================
   Layout
   ======================================== */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   Header
   ======================================== */

.header {
    padding: 2rem 0;
    border-bottom: 1px dashed var(--border);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
}

.logo::before {
    content: '~/';
    color: var(--text-dim);
}

.logo:hover {
    text-decoration: none;
    opacity: 0.8;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav a {
    color: var(--text-dim);
    font-size: 0.875rem;
}

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

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }

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

/* ========================================
   Hero
   ======================================== */

.hero {
    padding: 4rem 0;
}

.hero-prompt {
    color: var(--text-dim);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.hero-title .highlight {
    color: var(--accent);
}

.hero-bio {
    color: var(--text-dim);
    max-width: 500px;
    font-size: 0.9rem;
}

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

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--accent);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ========================================
   Projects
   ======================================== */

.projects {
    padding: 2rem 0 0;
}

.projects:last-of-type {
    padding-bottom: 4rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.875rem;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-desc {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

/* ========================================
   Project Card
   ======================================== */

.project {
    background: var(--bg-card);
    padding: 1.25rem 1.5rem;
    transition: background 0.15s;
}

.project:hover {
    background: var(--bg-hover);
}

.project-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
}

.project-main {
    min-width: 0;
}

.project-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-name::before {
    content: '>';
    color: var(--accent);
}

.project-desc {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-dim);
}

.project-links {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.project-link {
    font-size: 0.8rem;
    color: var(--text-dim);
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.15s;
}

.project-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

.project-link.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.project-link.primary:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    color: var(--bg);
}

/* Project Image */
.project-image {
    margin-top: 1rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.project:hover .project-image img {
    opacity: 1;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 2rem 0;
    border-top: 1px dashed var(--border);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.footer a {
    color: var(--text-dim);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 600px) {
    .project-header {
        grid-template-columns: 1fr;
    }

    .project-links {
        justify-content: flex-start;
        margin-top: 0.75rem;
    }

    .nav {
        gap: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor {
        animation: none;
    }
}
