/* ===== CSS Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.project-content a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.project-content a:hover {
    color: var(--primary-dark);
}

/* ===== Enhanced Project Content Styles ===== */
.project-intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    padding: 2rem;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.project-content hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 3rem 0;
}

.project-content code {
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.project-content pre {
    background: var(--secondary-color);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    line-height: 1.6;
}

.project-content pre code {
    background: none;
    padding: 0;
    color: white;
}

.project-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.project-content em {
    color: var(--text-secondary);
    font-style: italic;
}

.prototype-cta {
    text-align: center;
    margin: 3rem 0;
}

.btn-large {
    font-size: 1.25rem;
    padding: 1.25rem 3rem;
}

.project-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    text-align: center;
}

.project-footer p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ===== Footer/Contact Section ===== */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

/* ===== Navigation ===== */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* ===== Hero Section ===== */
.hero {
    padding: 12rem 0 8rem;
    background: url('/images/background.jpg') center center / cover no-repeat;
    background-attachment: fixed;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0) 0%, rgba(30, 41, 59, 0.7) 100%);
    animation: pulse 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--bg-white), transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.intro-text {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.auto-transition {
    font-size: 3rem;
    font-weight: 600;
    height: 4rem;
    position: relative;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.95);
}

.auto-transition span {
    display: block;
    position: absolute;
    width: 100%;
    text-align: center;
    opacity: 0;
    animation: textRotate 9s infinite;
}

.auto-transition span:nth-child(1) {
    animation-delay: 0s;
}

.auto-transition span:nth-child(2) {
    animation-delay: 3s;
}

.auto-transition span:nth-child(3) {
    animation-delay: 6s;
}

/* ===== About Section ===== */
.about {
    padding: 6rem 0;
    background-color: var(--bg-white);
}

.about-content {
    max-width: 900px;
}

.about-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.certifications-list {
    list-style: none;
    margin: 1.5rem 0 2rem;
}

.certifications-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.certifications-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.resume-download {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* ===== Work Section ===== */
.work {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.projects-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.project-description {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.project-details {
    margin: 2rem 0;
}

.detail-item {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

.detail-item h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.detail-item p {
    font-size: 0.95rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 1rem;
}

.project-link:hover {
    gap: 0.5rem;
}

/* ===== Footer/Contact Section ===== */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    text-align: center;
    margin-bottom: 3rem;
}

.footer-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.8);
}

.contact-info {
    margin-top: 2rem;
}

.contact-info a {
    color: white;
    text-decoration: underline;
}

.contact-info a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes textRotate {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    5% {
        opacity: 1;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(0);
    }

    35% {
        opacity: 0;
        transform: translateY(-30px);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero {
        padding: 8rem 0 6rem;
        min-height: 70vh;
        background-attachment: scroll;
    }

    .intro-text {
        font-size: 3rem;
    }

    .auto-transition {
        font-size: 2rem;
        height: 3rem;
        min-width: 350px;
        padding: 0.5rem 1rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .container {
        padding: 0 1rem;
    }

    .about,
    .work {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .intro-text {
        font-size: 2.25rem;
    }

    .auto-transition {
        font-size: 1.5rem;
        height: 2.5rem;
        min-width: 280px;
        padding: 0.5rem 1rem;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}