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

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #b5b5b5;
    color: #1a1a1a;
    line-height: 1.5;
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #b5b5b5;
    border-bottom: 3px solid #1a1a1a;
    z-index: 100;
}

.nav-name {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

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

.nav-links a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
}

.nav-links a:hover {
    text-decoration: line-through;
}

/* MAIN */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 32px;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 60px;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -3px;
    text-transform: uppercase;
    margin-bottom: 40px;
}

.hero-meta {
    border-left: 3px solid #1a1a1a;
    padding-left: 16px;
    margin-bottom: 40px;
}

.hero-meta p {
    font-size: 0.8rem;
    letter-spacing: 3px;
    font-weight: 700;
    line-height: 1.8;
}

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

.hero-links a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: 2px solid #1a1a1a;
    padding: 10px 20px;
}

.hero-links a:hover {
    background: #1a1a1a;
    color: #b5b5b5;
}

/* DIVIDER */
.divider {
    height: 3px;
    background: #1a1a1a;
    margin: 0;
}

/* SECTIONS */
.section {
    padding: 80px 0;
}

.section h2 {
    font-size: 0.75rem;
    letter-spacing: 4px;
    font-weight: 700;
    margin-bottom: 32px;
    text-transform: uppercase;
}

.section-body p {
    font-size: 1rem;
    max-width: 500px;
    line-height: 1.7;
}

/* EXPERIENCE */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 3px solid #1a1a1a;
}

.exp-item {
    padding: 24px;
    border-bottom: 2px solid #1a1a1a;
}

.exp-item:last-child {
    border-bottom: none;
}

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

.exp-role {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.exp-date {
    font-size: 0.65rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #555;
}

.exp-company {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #555;
    margin-bottom: 12px;
}

.exp-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 600px;
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 3px solid #1a1a1a;
}

.skill-group {
    padding: 20px;
    border-bottom: 2px solid #1a1a1a;
    border-right: 2px solid #1a1a1a;
}

.skill-group:nth-child(even) {
    border-right: none;
}

.skill-group:nth-last-child(-n+2) {
    border-bottom: none;
}

/* handle odd last item spanning full width */
.skill-group:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: none;
}

.skill-group p {
    font-size: 0.85rem;
    line-height: 1.6;
}

/* PROJECT CARD */
.project {
    border: 3px solid #1a1a1a;
    padding: 32px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.project-tag {
    font-size: 0.65rem;
    letter-spacing: 2px;
    font-weight: 700;
    border: 2px solid #1a1a1a;
    padding: 4px 10px;
}

.project-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 600px;
}

.project-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.detail-block {
    border-left: 3px solid #1a1a1a;
    padding-left: 16px;
}

.detail-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 6px;
}

.detail-block p {
    font-size: 0.85rem;
    line-height: 1.6;
}

/* 3D VIEWER */
.viewer-section {
    margin-bottom: 28px;
}

.viewer-controls {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.viewer-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 10px 24px;
    border: 2px solid #1a1a1a;
    background: transparent;
    color: #1a1a1a;
    cursor: pointer;
}

.viewer-btn + .viewer-btn {
    border-left: none;
}

.viewer-btn.active {
    background: #1a1a1a;
    color: #b5b5b5;
}

.viewer-btn:hover:not(.active) {
    background: #999;
}

.viewer-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 700;
    padding: 10px 16px;
    border: 2px solid #1a1a1a;
    border-top: none;
    background: #a0a0a0;
}

.viewer-container {
    position: relative;
    width: 100%;
    height: 500px;
    border: 2px solid #1a1a1a;
    border-top: none;
    background: #1a1a1a;
    overflow: hidden;
}

.viewer-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #b5b5b5;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    letter-spacing: 3px;
    font-weight: 700;
    z-index: 10;
}

.viewer-hint {
    font-size: 0.6rem;
    letter-spacing: 2px;
    font-weight: 700;
    padding: 8px 16px;
    border: 2px solid #1a1a1a;
    border-top: none;
    color: #666;
}

.project-repo {
    display: inline-block;
    color: #1a1a1a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
}

.project-repo:hover {
    text-decoration: line-through;
}

/* SOLAR SUN */
.sun-container {
    border: 2px solid #1a1a1a;
    background: #1a1a1a;
    padding: 16px 0;
    margin-bottom: 24px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.solar-sun {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 12px;
    color: #b5b5b5;
    letter-spacing: 1px;
    margin: 0;
    white-space: pre;
    text-align: center;
}

/* ARCHITECTURE DIAGRAM */
.architecture-block {
    border: 2px solid #1a1a1a;
    padding: 20px;
    margin-bottom: 28px;
    background: #1a1a1a;
}

.architecture-block .detail-label {
    color: #b5b5b5;
    margin-bottom: 12px;
}

.arch-diagram {
    color: #b5b5b5;
    font-size: 0.75rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}

/* PROJECT STATS */
.project-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 2px solid #1a1a1a;
    margin-top: 28px;
}

.stat {
    padding: 20px 16px;
    text-align: center;
    border-right: 2px solid #1a1a1a;
}

.stat:last-child {
    border-right: none;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

.stat-label {
    display: block;
    font-size: 0.55rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #555;
}

/* CONTACT */
.contact-links {
    display: flex;
    gap: 20px;
    margin-top: 24px;
}

.contact-email {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: 2px solid #1a1a1a;
    padding: 10px 20px;
}

.contact-email:hover {
    background: #1a1a1a;
    color: #b5b5b5;
}

.contact-links a:not(.contact-email) {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border: 2px solid #1a1a1a;
    padding: 10px 20px;
}

.contact-links a:not(.contact-email):hover {
    background: #1a1a1a;
    color: #b5b5b5;
}

/* FOOTER */
footer {
    border-top: 3px solid #1a1a1a;
    padding: 24px 32px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    nav {
        padding: 12px 16px;
    }

    .nav-name {
        font-size: 0.65rem;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 0.65rem;
    }

    main {
        padding: 0 16px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero-links,
    .contact-links {
        flex-direction: column;
        gap: 12px;
    }

    .hero-links a,
    .contact-links a {
        text-align: center;
    }

    .project {
        padding: 20px;
    }

    .viewer-container {
        height: 350px;
    }

    .viewer-btn {
        padding: 8px 16px;
        font-size: 0.65rem;
    }

    .project-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat {
        border-bottom: 2px solid #1a1a1a;
    }

    .stat:nth-child(2) {
        border-right: none;
    }

    .stat:nth-child(3),
    .stat:nth-child(4) {
        border-bottom: none;
    }

    .arch-diagram {
        font-size: 0.6rem;
    }

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

    .skill-group {
        border-right: none;
    }

    .skill-group:last-child {
        border-bottom: none;
    }
}

/* SELECTION */
::selection {
    background: #1a1a1a;
    color: #b5b5b5;
}
