:root {
    --bg-color: #F5F5F0; /* Slightly warmer grey/white */
    --text-color: #222222; /* Deep Black */
    --accent-color: #E65100; /* Deep International Orange */
    --secondary-accent: #546E7A; /* Technical Grey-Blue */
    --grid-color: rgba(0, 0, 0, 0.04);
    --border-color: rgba(0, 0, 0, 0.1);

    --font-mono: 'Courier Prime', monospace;
    --font-sans: 'Inter', sans-serif;

    --spacing-unit: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;

    /* Graph Paper Background */
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Film Grain Overlay (Subtle) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Corner Markers */
.corner-mark {
    position: fixed;
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--text-color);
    opacity: 0.3;
    z-index: 100;
    pointer-events: none;
}
.top-left { top: 10px; left: 15px; }
.top-right { top: 10px; right: 15px; }
.bottom-left { bottom: 10px; left: 15px; }
.bottom-right { bottom: 10px; right: 15px; }

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    border-left: 1px dashed var(--border-color);
    border-right: 1px dashed var(--border-color);
    min-height: 100vh;
    background: rgba(255,255,255,0.85);
}

/* Header */
.site-header {
    margin-bottom: 5rem;
    position: relative;
}

.header-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--secondary-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: inline-block;
    animation: blink 2s infinite;
}

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

.logo {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-color);
    letter-spacing: 1px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    opacity: 0.7;
    padding: 0.25rem;
}

.social-icon:hover {
    opacity: 1;
    color: var(--accent-color);
    transform: translateY(-2px);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 6rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.9);
    position: relative;
}

/* Corner accents for Hero */
.hero::after {
    content: "";
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--text-color);
    border-right: 2px solid var(--text-color);
}

.binary-bg {
    width: 300px;
    height: 300px;
    background-image: url("0101.png");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Optional: Add subtle movement to the numbers background for "dynamic" effect */
.binary-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image: url("0101.png");
    background-size: 250px 250px;
    opacity: 0.1;
    animation: binary-scroll 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes binary-scroll {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, -50%); }
}

.binary-bg img {
    width: 240px;
    height: auto;
    z-index: 1;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.intro-text {
    font-size: 1.2rem;
    max-width: 450px;
}

/* Bio Data */
.bio-data {
    margin-top: 2rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1.5rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 0.25rem;
}

.data-label {
    font-family: var(--font-mono);
    color: var(--secondary-accent);
    text-transform: uppercase;
    font-size: 0.75rem;
}

.data-value {
    font-family: var(--font-sans);
    font-weight: 500;
}

.credential-list {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.credential-list span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
    padding: 2px 4px;
    color: var(--accent-color);
}

.typewriter {
    font-family: var(--font-mono);
    color: var(--accent-color);
    margin-top: 0.5rem;
    border-right: 2px solid var(--accent-color);
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3s steps(19, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink-caret { 50% { border-color: transparent; } }

/* Sections */
section {
    margin-bottom: 6rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.section-title span {
    font-size: 0.9rem;
    color: #fff;
    background: var(--text-color);
    padding: 2px 6px;
    border-radius: 2px;
}

/* Research List (The Index Style) */
.research-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.research-item:hover {
    background-color: rgba(255,255,255,0.9);
}

.item-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--secondary-accent);
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    text-align: right;
    opacity: 0.5;
    border-left: 1px solid var(--border-color);
    padding-left: 0.5rem;
}

.item-content {
    flex: 1;
}

.research-item .date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-color);
}

.research-item .title {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0.25rem 0 0.5rem 0;
}

.research-item .title a {
    text-decoration: none;
    color: var(--text-color);
    background-image: linear-gradient(var(--accent-color), var(--accent-color));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s;
}

.research-item:hover .title a {
    background-size: 100% 2px;
}

/* Gallery (Contact Sheet Style) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    position: relative;
}

/* Pseudo-tape effect */
.gallery-item::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: rgba(230, 230, 230, 0.6);
    transform: translateX(-50%) rotate(-2deg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.placeholder-image {
    width: 100%;
    height: 180px;
    background: #f0f0f0;
    margin-bottom: 0.75rem;
    background-image: radial-gradient(#ddd 1px, transparent 1px);
    background-size: 10px 10px;
    border: 1px solid #eee;
}

.gallery-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 0.75rem;
    border: 1px solid #eee;
    display: block;
}

.caption {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--secondary-accent);
    display: block;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--secondary-accent);
    opacity: 0.7;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.heart { color: var(--accent-color); }

/* Responsive */
@media (max-width: 600px) {
    .corner-mark { display: none; }
    .container { border: none; padding: 2rem 1rem; }
    .hero { flex-direction: column; align-items: flex-start; }
    .research-item { flex-direction: column; gap: 0.5rem; }
    .item-meta { writing-mode: horizontal-tb; transform: none; border-left: none; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; padding-left: 0; width: 100%; }
}
