/* ===== Variables ===== */
:root {
    --bg: #0a0a0a;
    --bg-subtle: #111111;
    --text: #e8e8e8;
    --text-muted: #6b6b6b;
    --accent: #c9a55c;
    --border: #1f1f1f;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "DM Sans", sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(
            ellipse 80% 50% at 20% 40%,
            rgba(201, 165, 92, 0.04) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse 60% 40% at 80% 60%,
            rgba(201, 165, 92, 0.03) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse 100% 80% at 50% 100%,
            rgba(30, 30, 35, 0.8) 0%,
            transparent 60%
        ),
        linear-gradient(180deg, var(--bg) 0%, #0d0d0f 50%, #080808 100%);
    color: var(--text);
    line-height: 1.7;
    font-weight: 300;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle grain texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

/* ===== Layout ===== */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Decorative Element ===== */
.decoration {
    position: fixed;
    top: 3rem;
    right: 3rem;
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    opacity: 0.4;
    animation: fadeIn 1s ease-out 0.5s both;
}

.decoration::after {
    content: "";
    position: absolute;
    top: 0;
    left: -3px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: var(--bg);
}

/* ===== Typography ===== */
.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1.25rem;
    font-weight: 500;
}

/* ===== Links ===== */
.link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

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

.link svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.link:hover svg {
    opacity: 1;
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.4;
    }
}

/* ===== Homepage Styles ===== */
main.home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0;
}

.header {
    margin-bottom: 2rem;
    animation: fadeUp 0.8s ease-out;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.photo-wrapper {
    flex-shrink: 0;
}

.photo {
    width: 175px;
    height: 175px;
    border-radius: 39%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--border);
    transition: border-color 0.3s ease;
}

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

.header-text {
    flex: 1;
}

.name {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.title {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    font-weight: 400;
}

.bio {
    margin-bottom: 3.5rem;
    animation: fadeUp 0.8s ease-out 0.1s both;
}

.bio p {
    color: var(--text-muted);
    font-size: 1.0625rem;
    margin-bottom: 1.5rem;
}

.bio p:last-child {
    margin-bottom: 0;
}

.bio strong {
    color: var(--text);
    font-weight: 400;
}

.projects {
    margin-bottom: 3.5rem;
    animation: fadeUp 0.8s ease-out 0.2s both;
}

.project-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: transparent;
}

.project-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.connect {
    animation: fadeUp 0.8s ease-out 0.3s both;
}

.links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

/* ===== CV Page Styles ===== */
main.cv {
    padding: 4rem 0 6rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 3rem;
    transition: color 0.3s ease;
    animation: fadeUp 0.8s ease-out;
}

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

.back-link svg {
    width: 16px;
    height: 16px;
}

.cv-header {
    margin-bottom: 3rem;
    animation: fadeUp 0.8s ease-out 0.05s both;
}

.cv-name {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text);
}

.cv-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cv-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

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

.cv-link svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.cv-section {
    margin-bottom: 3rem;
}

.cv-section:nth-child(3) {
    animation: fadeUp 0.8s ease-out 0.1s both;
}
.cv-section:nth-child(4) {
    animation: fadeUp 0.8s ease-out 0.15s both;
}
.cv-section:nth-child(5) {
    animation: fadeUp 0.8s ease-out 0.2s both;
}
.cv-section:nth-child(6) {
    animation: fadeUp 0.8s ease-out 0.25s both;
}
.cv-section:nth-child(7) {
    animation: fadeUp 0.8s ease-out 0.3s both;
}

.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1.25rem;
    font-weight: 500;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.profile-text {
    color: var(--text-muted);
    font-size: 1rem;
}

.skill-group {
    margin-bottom: 1rem;
}

.skill-group:last-child {
    margin-bottom: 0;
}

.skill-label {
    color: var(--text);
    font-weight: 400;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.skill-items {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.project {
    margin-bottom: 2rem;
}

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

.project-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.project-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--text);
}

.project-url {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: opacity 0.3s ease;
}

.project-url:hover {
    opacity: 0.7;
}

.project-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.project-details {
    list-style: none;
}

.project-details li {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
}

.project-details li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.6;
}

.project-details li:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: var(--text);
    font-weight: 400;
}

.education-item {
    margin-bottom: 1.5rem;
}

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

.education-name {
    color: var(--text);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.education-date {
    color: var(--accent);
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.education-desc {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    main.home {
        padding: 4rem 0;
    }

    .header {
        margin-bottom: 3rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .photo {
        width: 100px;
        height: 100px;
    }

    .name {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .links {
        flex-direction: row;
        gap: 1rem;
    }

    main.cv {
        padding: 3rem 0 4rem;
    }

    .cv-name {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .cv-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .project-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .decoration {
        display: none;
    }
}
