/* ===========================================
   Iiro Purola Portfolio - Styles
   =========================================== */

/* Color Palette */
:root {
    --royal-blue-dark: #0a2463;
    --tufts-blue: #3e92cc;
    --carrot-orange: #f49d37;
    --cerise: #d8315b;
    --black-chocolate: #1e1b18;
    
    /* Theme colors - blue background with orange accents */
    --bg-primary: #050e2b;
    --bg-secondary: #081640;
    --bg-card: rgba(62, 146, 204, 0.1);
    --bg-card-hover: rgba(62, 146, 204, 0.2);
    --text-primary: #f5f5f4;
    --text-secondary: #b8c5d6;
    --text-muted: #7a8fa8;
    --accent: #f49d37;
    --accent-glow: rgba(244, 157, 55, 0.4);
    --link-color: #f49d37;
    --link-hover: #ffc170;
    --border-color: rgba(62, 146, 204, 0.25);
    --border-hover: rgba(62, 146, 204, 0.4);
}

/* ===========================================
   Reset & Base
   =========================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(62, 146, 204, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(62, 146, 204, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* ===========================================
   Layout
   =========================================== */

/* Top accent line */
.top-accent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(244, 157, 55, 0.2);
    z-index: 100;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

@media (min-width: 768px) {
    main {
        padding: 6rem 1.5rem;
    }
}

/* ===========================================
   Typography
   =========================================== */

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }
}

h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.125rem;
    font-weight: 500;
}

h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
}

/* ===========================================
   Header Section
   =========================================== */

header {
    margin-bottom: 4rem;
    animation: fadeInUp 0.6s ease-out forwards;
}

.logo {
    width: 80px;
    height: auto;
    margin-bottom: 2rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 1;
}

.logo svg {
    width: 100%;
    height: auto;
    display: block;
}

@media (min-width: 768px) {
    .logo {
        width: 100px;
    }
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .subtitle {
        font-size: 1.5rem;
    }
}

.subtitle .highlight {
    color: var(--accent);
}

.intro {
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.8;
}

/* ===========================================
   Terminal Window
   =========================================== */

.terminal-window {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
    opacity: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.terminal-header {
    background: rgba(62, 146, 204, 0.15);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.terminal-button.close {
    background: #ff5f56;
}

.terminal-button.minimize {
    background: #ffbd2e;
}

.terminal-button.maximize {
    background: #27c93f;
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex: 1;
    text-align: center;
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.terminal-line {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.terminal-line .prompt {
    color: var(--accent);
    margin-right: 0.5rem;
}

.terminal-output {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.output-success {
    color: #27c93f;
}

.output-info {
    color: var(--tufts-blue);
}

.output-error {
    color: #ff5f56;
}

.cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--accent);
    margin-left: 0.1rem;
}

/* ===========================================
   Sections
   =========================================== */

section {
    margin-bottom: 4rem;
}

.section-delay-1 { animation: fadeInUp 0.6s ease-out 0.2s forwards; opacity: 0; }
.section-delay-2 { animation: fadeInUp 0.6s ease-out 0.3s forwards; opacity: 0; }
.section-delay-3 { animation: fadeInUp 0.6s ease-out 0.4s forwards; opacity: 0; }
.section-delay-4 { animation: fadeInUp 0.6s ease-out 0.5s forwards; opacity: 0; }
.section-delay-5 { animation: fadeInUp 0.6s ease-out 0.6s forwards; opacity: 0; }
.section-delay-6 { animation: fadeInUp 0.6s ease-out 0.7s forwards; opacity: 0; }

/* ===========================================
   Skills
   =========================================== */

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.skills-category {
    margin-bottom: 1.5rem;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.skills-category h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

/* ===========================================
   Certifications
   =========================================== */

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

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.cert-badge:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-card-hover);
    transform: translateY(-2px);
}

.cert-badge .cert-icon {
    color: var(--accent);
}

/* ===========================================
   Experience
   =========================================== */

.experience-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.experience-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .experience-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
    }
}

.experience-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.experience-company {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.experience-company a {
    color: var(--accent);
}

.experience-company a:hover {
    color: var(--link-hover);
}

.experience-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.experience-description ul {
    list-style: none;
    margin-top: 0.75rem;
}

.experience-description li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

.experience-description li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ===========================================
   Cards Grid
   =========================================== */

.cards-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    padding: 1.25rem;
    border-radius: 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease;
}

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

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(244, 157, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.card-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    stroke: currentColor;
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===========================================
   Education & Languages
   =========================================== */

.info-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-block h3 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.info-block p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-block .date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===========================================
   Social Links
   =========================================== */

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

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

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

.social-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.social-link:hover::after {
    width: 100%;
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-link svg.stroke-icon {
    fill: none;
    stroke: currentColor;
}

/* ===========================================
   Footer
   =========================================== */

footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-location {
    font-size: 0.75rem;
}

/* ===========================================
   Animations
   =========================================== */

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

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