/* ========================================
   ROOT VARIABLES & THEME COLORS
   ======================================== */

:root {
    /* Light Mode Colors */
    --color-deep-coffee: #1d1716;
    --color-chestnut: #402a23;
    --color-terracotta: #a55233;
    --color-golden-sand: #f3bc77;
    --color-electric-blue: #00aaff;
    
    /* Light Mode Theme */
    --bg-primary: #faf8f6;
    --bg-secondary: #ffffff;
    --bg-accent: #f3bc77;
    --text-primary: #1d1716;
    --text-secondary: #402a23;
    --text-muted: #6b5b52;
    --border-color: #e8dfd7;
    --shadow-color: rgba(29, 23, 22, 0.1);
    --accent-primary: #a55233;
    /*--accent-secondary: #00aaff;*/
    --accent-hover: #8a4228;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'Courier New', monospace;
    
    /* Spacing */
    --header-height: 4rem;
    --section-padding: 5rem 0;
    --container-width: 1200px;
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 2rem;
    --gap-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode Colors */
body.dark-theme {
    --bg-primary: #1d1716;
    --bg-secondary: #2a1f1d;
    --bg-accent: #402a23;
    --text-primary: #f3bc77;
    --text-secondary: #e8dfd7;
    --text-muted: #b8a89c;
    --border-color: #402a23;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --accent-primary: #f3bc77;
    /*--accent-secondary: #00aaff;*/
    --accent-hover: #ffd699;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    background: none;
}

/* ========================================
   REUSABLE CLASSES
   ======================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section__subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: var(--gap-xl);
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 100;
    transition: background-color var(--transition-normal);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.nav__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

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

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

.nav__link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link--active {
    color: var(--accent-primary);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width var(--transition-fast);
}

.nav__link:hover::after,
.nav__link--active::after {
    width: 100%;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.theme-toggle:hover {
    transform: rotate(20deg) scale(1.1);
    box-shadow: 0 0 15px var(--accent-secondary);
}

.nav__toggle,
.nav__close {
    display: none;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero__container {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero__name {
    display: block;
    background: linear-gradient(135deg, var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--accent-primary));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--accent-secondary));
    }
}

.hero__subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero__buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-xl);
    margin-top: var(--gap-xl);
}

.about__description {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about__skills-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.about__skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about__skill-item {
    padding: 0.75rem 1.25rem;
    background-color: var(--bg-secondary);
    border-left: 3px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.about__skill-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.projects {
    background-color: var(--bg-secondary);
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: var(--gap-xl);
}

.project__card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.project__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--accent-primary);
}

.project__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project__title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent-primary);
}

.project__description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project__link {
    color: var(--accent-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.project__link:hover {
    color: var(--accent-secondary);
    gap: 0.75rem;
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
}

.timeline__item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline__marker {
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: var(--accent-primary);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-primary);
    z-index: 1;
}

.timeline__content {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--accent-primary);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.timeline__title {
    font-size: 1.75rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.timeline__company {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.timeline__description {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.timeline__description li {
    margin-bottom: 0.5rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact {
    background-color: var(--bg-secondary);
}

.contact__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    margin-top: var(--gap-xl);
}

/* Contact Form */
.contact__form-wrapper {
    position: relative;
}

.contact__form {
    background-color: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(165, 82, 51, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.form__submit {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form__message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
}

.form__message.show {
    opacity: 1;
    transform: translateY(0);
}

.form__message.success {
    background-color: rgba(165, 82, 51, 0.1);
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.form__message.error {
    background-color: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 2px solid #dc2626;
}

/* Contact Info */
.contact__info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__info-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.contact__info-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent-primary);
    transition: all var(--transition-fast);
}

.contact__info-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.contact__info-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.contact__info-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}

.contact__info-content a {
    color: var(--accent-primary);
    font-weight: 600;
    word-break: break-all;
}

.contact__info-content a:hover {
    color: var(--accent-secondary);
}

/* Social Links */
.social__links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social__link {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    transition: all var(--transition-fast);
}

.social__link:hover {
    background-color: var(--accent-primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--accent-secondary);
}

/* ========================================
   RESUME PAGE
   ======================================== */

.resume__actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.resume__embed-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-color);
    border: 2px solid var(--border-color);
}

.resume__iframe {
    width: 100%;
    height: 90vh;
    min-height: 600px;
    border: none;
    display: block;
}

.resume__fallback {
    display: none;
    text-align: center;
    padding: 3rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.resume__fallback-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.resume__fallback-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer__text {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

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

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media screen and (max-width: 968px) {
    .section__title {
        font-size: 2rem;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1.25rem;
    }

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

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

    .contact__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background-color: var(--bg-secondary);
        box-shadow: -2px 0 10px var(--shadow-color);
        padding: 4rem 2rem;
        transition: right var(--transition-normal);
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        font-size: 2rem;
        color: var(--accent-primary);
        cursor: pointer;
    }

    .nav__toggle {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        cursor: pointer;
    }

    .nav__toggle span {
        width: 1.5rem;
        height: 2px;
        background-color: var(--accent-primary);
        border-radius: 2px;
        transition: all var(--transition-fast);
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1.1rem;
    }

    .hero__buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero__buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .contact__form {
        padding: 1.5rem;
    }

    .resume__actions {
        flex-direction: column;
        align-items: center;
    }

    .resume__actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section__title {
        font-size: 1.75rem;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline__marker {
        left: -1.75rem;
        width: 1rem;
        height: 1rem;
    }

    .timeline__content {
        padding: 1.5rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}