/* Global link color */
a {
    color: #7a1e2e;
    transition: color 0.2s ease;
}

a:hover {
    color: #a02840;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c2c2c;
    --primary-light: #555;
    --accent: #6b7280;
    --dark: #1a1a1a;
    --light: #fafafa;
    --gray: #888;
    --border: #e5e5e5;
    --bg-subtle: #f5f5f5;
    --font-body: 'JetBrains Mono', monospace;
}

body {
    font-family: var(--font-body);
    line-height: 1.75;
    color: #333;
    background: var(--dark);
    min-height: 100vh;
}

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

/* Header and Navigation */
header {
    background: var(--dark);
    padding: 40px 20px 16px;
    margin-bottom: 0;
}

nav {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

nav h1 {
    font-size: 2.4rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    border-bottom: 3px solid rgba(255,255,255,0.7);
    padding-bottom: 8px;
}

.nn-note {
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.tagline {
    color: rgba(255,255,255,0.55);
    font-size: 0.95rem;
    margin-bottom: 24px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Neural-network navigation */
#neural-nav {
    position: relative;
    width: 100%;
    height: 250px;
}

#nn-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Main Content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 20px;
}

/* Sections */
.section {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease;
}

.section:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.section h2 .icon {
    font-size: 1.1rem;
}

.section p {
    margin-bottom: 12px;
    color: #555;
}

.section > ul {
    list-style: none;
    margin-left: 0;
}

.section > ul > li {
    margin-bottom: 8px;
    padding: 10px 14px;
    background: var(--bg-subtle);
    border-radius: 6px;
    border-left: 3px solid #ccc;
    color: #444;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.project-card {
    border: 1px solid var(--border);
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.project-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 600;
}

.project-card p {
    line-height: 1.65;
    color: #555;
    font-size: 0.9rem;
}

/* Experience */
.experience-item {
    margin-bottom: 20px;
    padding: 20px;
    padding-left: 24px;
    border-left: 3px solid #d4d4d4;
    border-radius: 0 6px 6px 0;
    transition: border-color 0.2s ease;
}

.experience-item:hover {
    border-left-color: #999;
}

.experience-item h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: var(--dark);
    font-weight: 600;
}

.experience-item .date {
    color: var(--gray);
    font-style: normal;
    font-weight: 500;
    font-size: 0.82rem;
    margin-bottom: 10px;
    display: inline-block;
    background: var(--bg-subtle);
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.2px;
}

.experience-item ul {
    list-style: none;
    margin-left: 0;
}

.experience-item ul li {
    margin-bottom: 6px;
    padding-left: 18px;
    position: relative;
    color: #555;
    font-size: 0.92rem;
}

.experience-item ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: #aaa;
}

/* Skills Section */
#skills p {
    display: inline-block;
    margin: 6px 0;
}

.skill-category {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.skill-tag {
    background: var(--dark);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Contact Links */
#contact ul {
    list-style: none;
}

#contact ul li {
    margin-bottom: 10px;
}

#contact a {
    color: #7a1e2e;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

#contact a:hover {
    color: #a02840;
    border-bottom-color: #7a1e2e;
}

/* Responsive video embed */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* PDF embed */
.pdf-wrapper {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.pdf-wrapper iframe {
    display: block;
    width: 100%;
    height: 700px;
    border: 0;
}

/* Footer */
footer {
    background: var(--dark);
    color: #fff;
    padding: 28px 20px;
    text-align: center;
    margin-top: 0;
}

footer p {
    opacity: 0.5;
    font-size: 0.85rem;
}

/* Landing page — unified dark background */
body.landing {
    background: var(--dark);
    color: rgba(255,255,255,0.5);
}

body.landing main {
    display: none;
}

body.landing footer {
    background: var(--dark);
    border-top: 1px solid rgba(255,255,255,0.07);
}

body.landing header {
    padding-bottom: 28px;
}

/* Landing hint */
.landing-hint {
    text-align: center;
    color: rgba(255,255,255,0.25);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 0 0;
}

/* Back button on sub-pages */
.back-btn-wrapper {
    text-align: center;
    padding: 24px 0 8px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.back-btn:hover {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav h1 {
        font-size: 1.6rem;
        text-align: center;
    }

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

    .section {
        padding: 20px;
    }

    .section h2 {
        font-size: 1.15rem;
    }

    #neural-nav {
        height: 180px;
    }
}
