:root {
    --bg-color: #FFF8DC; /* Cornsilk */
    --card-bg: #FAEBD7; /* AntiqueWhite */
    --primary: #D2691E; /* Chocolate */
    --primary-hover: #8B4513; /* SaddleBrown */
    --accent: #556B2F; /* DarkOliveGreen */
    --accent-hover: #334418;
    --text-main: #2c2c2c;
    --text-muted: #555;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

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

/* Hero Section */
.hero-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.canvas-container {
    flex: 2;
    min-width: 300px;
    height: 250px;
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

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

.loss-graph-container {
    flex: 1;
    min-width: 200px;
    height: 250px;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.05);
}

.loss-graph-container h3 {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#loss-canvas {
    width: 100%;
    flex-grow: 1;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    border-left: 1px solid #eee;
}

.stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-family: monospace;
    margin-top: 10px;
    color: var(--text-muted);
}

.btn-small {
    margin-top: 10px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
    align-self: flex-end;
}

.btn-small:hover {
    background: var(--primary-hover);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Links Bar */
.links-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.icon-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.icon-link:hover {
    color: var(--accent-hover);
}

.icon-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .experience {
        grid-column: span 2;
    }
    .research {
        grid-column: span 2;
    }
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

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

.card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid rgba(210, 105, 30, 0.2);
    padding-bottom: 10px;
}

.item {
    margin-bottom: 20px;
}

.item:last-child {
    margin-bottom: 0;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
}

.header-row h3 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.date {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.subtitle {
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.subtitle a {
    color: var(--primary);
    text-decoration: none;
}

.subtitle a:hover {
    text-decoration: underline;
}

.details {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

ul {
    list-style-type: none;
    padding-left: 0;
}

ul li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: #444;
}

ul li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.tag {
    background: rgba(210, 105, 30, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Skills */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tags span {
    background: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    transition: all 0.2s;
}

.skill-tags span:hover {
    background: var(--accent);
    color: white;
}

/* Projects */
.project-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.project-btn {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-btn:hover:not(.disabled) {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.project-btn.disabled {
    opacity: 0.6;
    background: #f5f5f5;
    cursor: default;
}

.project-btn .title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.project-btn .desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}
